estoy tratando de crear una información sobre herramientas permanente para un punto específico, ¿qué quiero decir diciendo permanente :: quiero decir que siempre se mostrará, no solo cuando está suspendido pero todo el tiempo. También estoy abierto a una etiqueta que se muestra allí, pero necesito que se relacione con ese punto exacto y no posiciones por posicionamiento X-Y css relativo al objeto del gráfico, ya que el ancho del gráfico es dinámico.crear una información sobre herramientas adhesiva para un punto o una etiqueta permanente usando HighCharts
ejemplos: serie: [{name: 'Anger',
datos: [{y: 9, x: Date.UTC (2011, 10, 5), nombre: 'USD a EUR', marcador: {symbol: 'url (sun.png)', label: '123', información sobre herramientas adhesivas: true}}]
por supuesto, esto no funcionará, pero espero que entiendas lo que estoy tratando de lograr.
gracias por su ayuda.
para aquellos wholike para ver el archivo completo:
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
defaultSeriesType: 'spline',
},
title: {
text: 'Emotions graph',
style: {
position: 'relative',
},
x: 20, //center,
y: 8 ,
},
subtitle: {
text: ' ',
x: -20
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { day: '%e. %b' },
tickInterval:24 * 3600 * 1000 * 7,
showLastLabel : true,
maxPadding:0,
minPadding:0
},
yAxis: {
max :10,
title: { text: 'Emotion level' },
},
tooltip: {
enabled:true,
formatter: function() {
var month=new Array(12);
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";
var temptime = new Date(this.x);
if (this.point.name != null) { thename = this.point.name + '<br/>'; } else { thename ='' };
return thename + '<b>'+ this.series.name +'</b><br/>Level of: '+
this.y + '<br/>Date: ' + temptime.getDate() + ' of ' + month[temptime.getMonth() ] ;
}
},
legend: {
style: { padding: 30 },
align: 'center',
verticalAlign: 'top',
y: 15,
floating: true,
borderWidth: 0
},
credits: { enabled: false },
series: [{
name: 'Excitment',
lineWidth: 2 ,
data: [
[Date.UTC(2011, 9, 27), 7],
[Date.UTC(2011, 9, 20), 6],
[Date.UTC(2011, 9, 21), 7],
[Date.UTC(2011, 10, 2), 8],
[Date.UTC(2011, 10, 9), 6],
[Date.UTC(2011, 10, 16), 6],
[Date.UTC(2011, 10, 14), 7],
[Date.UTC(2011, 10, 1), 1],
[Date.UTC(2011, 9, 24), 2],
[Date.UTC(2011, 10, 4), 9],
[Date.UTC(2011, 10, 11), 7],
[Date.UTC(2011, 10, 15), 7],
[Date.UTC(2011, 9, 25), 6],
[Date.UTC(2011, 10, 2), 7],
[Date.UTC(2011, 10, 6), 2],
[Date.UTC(2011, 10, 13), 8],
[Date.UTC(2011, 10, 3), 1],
[Date.UTC(2011, 9, 26), 1],
[Date.UTC(2011, 10, 9), 5],
[Date.UTC(2011, 10, 12), 6]
]
},{
name: 'Tranquility',
lineWidth: 2,
data: [
[Date.UTC(2011, 10, 18), 2],
[Date.UTC(2011, 9, 26), 2],
[Date.UTC(2011, 10, 1), 4],
[Date.UTC(2011, 10, 11), 5],
[Date.UTC(2011, 9, 21), 5],
[Date.UTC(2011, 10, 12), 9],
[Date.UTC(2011, 9, 25), 5],
[Date.UTC(2011, 10, 4), 4],
[Date.UTC(2011, 10, 9), 1],
[Date.UTC(2011, 10, 13), 5],
[Date.UTC(2011, 10, 19), 6],
[Date.UTC(2011, 9, 25), 6],
[Date.UTC(2011, 9, 31), 3],
[Date.UTC(2011, 10, 7), 3]
]
}, {
name: 'Happiness',
lineWidth: 2 ,
data: [
[Date.UTC(2011, 10, 9), 5],
[Date.UTC(2011, 9, 20), 5],
[Date.UTC(2011, 9, 28), 5],
[Date.UTC(2011, 10, 12), 6],
[Date.UTC(2011, 10, 1), 5],
[Date.UTC(2011, 9, 24), 5],
[Date.UTC(2011, 9, 29), 7],
[Date.UTC(2011, 10, 18), 4],
[Date.UTC(2011, 9, 24), 9],
[Date.UTC(2011, 9, 22), 3],
[Date.UTC(2011, 9, 21), 3]
]
},{
name: 'Anger',
lineWidth: 2,
data: [
[Date.UTC(2011, 9, 28), 4],
[Date.UTC(2011, 9, 26), 2],
[Date.UTC(2011, 10, 1), 4],
[Date.UTC(2011, 10, 11), 5],
[Date.UTC(2011, 9, 25), 8],
[Date.UTC(2011, 9, 27), 3],
[Date.UTC(2011, 9, 30), 8],
[Date.UTC(2011, 9, 29), 3],
{ y: 9, x: Date.UTC(2011, 10, 5), name: 'USD to EUR', marker: { symbol: 'url(sun.png)', label: '123' } },
[Date.UTC(2011, 9, 27), 4],
[Date.UTC(2011, 10, 18), 5],
[Date.UTC(2011, 10, 13), 7],
[Date.UTC(2011, 10, 19), 6],
[Date.UTC(2011, 9, 25), 6],
[Date.UTC(2011, 10, 12), 3],
[Date.UTC(2011, 9, 26), 4]
]
},{
name: 'Average',
lineWidth: 2,
data: [
{ y: 9, x: Date.UTC(2011, 9, 31), marker: { symbol: 'url(snow.png)' } },
[Date.UTC(2011, 9, 20), 4],
[Date.UTC(2011, 9, 22), 2],
[Date.UTC(2011, 10, 20), 4],
[Date.UTC(2011, 10, 16), 5],
[Date.UTC(2011, 9, 29), 8],
[Date.UTC(2011, 9, 28), 3],
[Date.UTC(2011, 9, 29), 9],
[Date.UTC(2011, 10, 08), 7],
[Date.UTC(2011, 10, 17), 6],
[Date.UTC(2011, 9, 23), 6],
[Date.UTC(2011, 10, 12), 3],
[Date.UTC(2011, 9, 27), 4]
]
}
]
});
});
¡genial, gracias! – Edan
@Dr. Genial, hey, puedes ver mi problema similar por favor. http://stackoverflow.com/questions/24513784/create-a-sticky-tooltip-in-highcharts-ng-implemented-in-jquery-highcharts –