cómo configurar el formateador de etiquetas Navigator en highcharts
Frecuentes
Visto 1,106 veces
1
I need to set the Navigator x axis Labels formatter but doesnt work ?is there anyway to set the x axis label values for Navigator?
Por favor, vea el código a continuación.
navigator: {
handles: {
backgroundColor: 'white',
borderColor: 'red',
},
labels: {
align: 'center',
x: 3,
y: 16,
formatter: function () {
if (((this.value * 4) % 1000) == 0) {
if ((((this.value) * 4) / 1000) % 5 == 0) {
alert("inside");
return (((this.value) * 4) / 1000) + "s";
}
else {
alert("inside else");
return (((this.value) * 4) / 1000) + "s";
}
}
else {
return (((this.value) * 4) / 1000) + "s";
}
}
},
enabled: true,
1 Respuestas
0
Su labels
options should be nested in an xAxis
opción:
navigator: {
handles: {
backgroundColor: 'white',
borderColor: 'red'
},
xAxis: { // you are missing this level
labels: {
formatter: function () {
if (((this.value * 4) % 1000) == 0) {
if ((((this.value) * 4) / 1000) % 5 == 0) {
alert("inside");
return (((this.value) * 4) / 1000) + "s";
}
else {
alert("inside else");
return (((this.value) * 4) / 1000) + "s";
}
}
else {
return (((this.value) * 4) / 1000) + "s";
}
}
}
}
}
Respondido el 22 de Septiembre de 13 a las 13:09
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas highcharts or haz tu propia pregunta.
Hi Mark , thanks for your reply .i had already added labels in x axis but the value in navigator is calculated based on the xaxis but i want to change the value in navigator .is there anyway to change? - user1127668
You can prepare your own serie for navigator and use by parameter api.highcharts.com/highstock#navigator.series the you achive separeted series on global xAxis and navigator. - Sebastián Bochán