0

I cannot reduce the number of Y axis labels on dimple.js line chart. I've tried to follow this solution on stackoverflow but have no luck. Here is my sample code:

var svg = dimple.newSvg("#ChartContainer", "100%", "100%");
var data = [{"Value(%):" 0.025, "Cost:" 95000},{"Value(%):" 0.26, "Cost:" 96000}, {"Value(%):" 0.027, "Cost:" 97000} ... etc etc. ( over 2000 pairs .. ) ];                               
 var chart = new dimple.chart(svg, data);
 var x = chart.addMeasureAxis("x", "Cost");
 var y = chart.addCategoryAxis("y", "Value(%)");
 y.addOrderRule("Cost");                                   
 var s = chart.addSeries(null, dimple.plot.line); 
 chart.addLogAxis("y", "Value(%)");                 
 chart.draw();

The chart draws ok, however, the Y axis labels make a complete mess. Here is what I got: enter image description here

Can anyone point me what I've missing, sounds like something very basics, but spent good couple of hours to figure out, and no luck. Thanks in advance.

USSR
  • 301
  • 1
  • 3
  • 22

1 Answers1

0

Sorted. The soluton is as described on this example, the only thing I was missing, is when to call that function, I was calling it AFTER the chart is drawn, but have to call it BEFORE chart draw function. Works as a charm.

USSR
  • 301
  • 1
  • 3
  • 22