I am trying to populate a highchart with some dynamic data in my angularjs application. I am using the "highcharts-ng" directive for working the the highcharts.
https://github.com/pablojim/highcharts-ng
The data is typically of the following format:
x-axis (categories):
[0, 0.0001001001001, 0.0002002002002, 0.0003003003003,
0.0004004004004, 0.000500500500501, 0.000600600600601]
y-axis:
{
name: value1,
data: [
0, 2.27112321592e-7, 8.69358451877e-7,
0.00000192654087985, 0.00000339761308545,
0.0000052811192715, 0.00000757519580291
]}
The categories can contain thousands of values, and for each value in "x-axis category", there is a corresponding y-axis value
I have set the "x-axis" categories dynamically using the following code: chart.xAxis[0].setCategories(categories);
Some other relevant properties that I have set are:
$scope.chartConfig = {
chart: {
type:'spline'
}
options: {
plotOptions: {
series: {
turboThreshold: 51000,
}
}
},
xAxis: {
type: 'category', (I tried with 'linear' as well)
allowDecimals: true,
min: 0,
},
useHighStocks: true
};
However, I am still seeing that "x-axis" is showing the values as "datetime". Is there any way in which I can make the x-axis value a simple "decimal values" and not as datetime?
Also, since the x-axis values are decimal values, is it possible to display the corresponding scientific notation instead (i.e. instead of showing 0.0003003003003, can we show 3.003e-04)?
Thanks in advance for your help.
Regards, Kapil