使用jqplot在xaxis中显示空字符串

时间:2014-01-21 04:54:11

标签: jquery jqplot linechart

我使用jqplot作为我的折线图,我在数据[date,int]中有2个字段,我的json数据在这里:

[{"12/15/2013": "10"},{"12/16/2013": "0"}, {"12/22/2013": "10"},{"12/29/2013": "0"},{"12/30/2013": "10"}] 
  • 在这个数据中,12月的第15天,第22天,第29天是星期日,我希望在xaxis标签中显示。
  • 在12月的第16天,30天,我不希望在xaxis中显示,但在yaxis中应该是显示点标签。

我的问题我无法找到如何做到这一点,无论如何,任何人都可以建议我。 感谢

1 个答案:

答案 0 :(得分:0)

您必须定义最小值和最大值

axes: {
       // Use a category axis on the x axis and use our custom ticks.
       xaxis: {
         min : 15,
         max : 29,
         numberTicks:3
       }
}