Reputation: 1060
I am using the following code to plot some data related to the passengers of the titanic by age using dimple.js:
var myChart = new dimple.chart(svg, data);
var ageAxis = myChart.addCategoryAxis("x", "Age");
myChart.addMeasureAxis("y", "Survived");
myChart.addSeries(null, dimple.plot.line);
ageAxis.addOrderRule('Age',false);
ageAxis.ticks=5; // this doesn't seem to work unfortunately
myChart.draw();
I get the following chart:
I want to define an interval for the ticks in the x axis to only display some of them
Thanks in advance
Upvotes: 0
Views: 646
Reputation: 4904
You can remove the excess labels after drawing as explained in the answer here:
cleaning axis in dynamic charts in dimple.js
Upvotes: 1