I'll try to be brief, Im trying to render a pie chart and setup labels to show total time, I'm getting ticks and I want to show it in a pie chart.
As far as I know pie charts doesn't se axis, and all alternatives I find are configured in X or Y axis. Something like this:
xAxis: {
type: 'datetime', //y-axis will be in milliseconds
},
And in the tooltip:
formatter: function () {
return '<b>' + this.series.name + '</b><br/>' +
Highcharts.dateFormat('%H:%M:%S', new Date(this.y));
},
This is my text code
Highcharts.chart('container', {
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
credits: {
enabled: false
},
title: {
text: ''
},
subtitle: {
text: ''
},
tooltip: {
formatter: function () {
return '<b>' + this.series.name + '</b><br/>' +
Highcharts.dateFormat('%H:%M:%S', new Date(this.y));
},
shared: true,
useHTML: true
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
data: [
[ 'T1',30600000000 ],
]
}]
});
I've tried some online ticks converters an all of them convert '30600000000' to 00:51:00 (HH:mm:ss) ut in my label is displayed 04:00:00.
here is a fiddle https://jsfiddle.net/lvevano/gp80ckfr/2/ What am I doing wrong ?
line
chart: jsfiddle.net/BlackLabel/opt7xzbv – ppotaczek