Jqplot show only few x axis ticks

I have to create a bar graph which shows a graph for 30 days. So I will show total 30 bars on the chart. But it looks very congested on the x axis. Is there a way where I can show only 6 x-axis ticks and not all the 30 x axis ticks?



I know that this is an old question but I need some solution too so here it is:
When you use jqplot to print bars you can't say it how many ticks it should print because it prints only related values so you have to print all ticks. My solution is not nice but it works. Just print ticks with empty label. For example:

axes: {
      xaxis: {
             max: 30,
             ticks: [[1,""],[2,""],[3,""],[4,""],[5,"5"],

By using ticks option of axies, you can specify exactly which ticks you want to show.

Link to the doc : http://www.jqplot.com/docs/files/jqplot-core-js.html#Axis.ticks


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.