开发者

Handling Large Datasets with With X axis Charts

I am using FLOTR API to display charts

I have some large sets of data for Six Months . For example

var jsonData = [August 19, 2004',August 20, 2004',August 21, 2004',August 22, 2004',.........,January 1 , 2005] ;

Like this for 6 Months .

But inside X axis I need to display only the Months date value开发者_StackOverflows .

Flotr.draw(
xaxis:{
tickFormatter: function(n)
{
return ;
},
}

Please tell me , what will be the best solution for this ??


In your xaxis object, you need to use the ticks property to specify the ticks you want.

It would look something like this:

xaxis: {
  ...
  ticks: [[<timestamp>,'August, 2004'],[<timestamp>,'September, 2004'],...,[<timestamp>,'January, 2005]],
  ...
}

You'll have to create the timestamps the same way you've created them for your data, but that's about it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜