jqplot: Separating ticks and series values

前端 未结 2 426

I have a web service that sends date values (for x-axis) in one array. It sends y-axis values in another array.

Is it possible to have jqPlot create a chart with 2

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 23:07

    I can not figure out a way for jqPlot to accept how you want to define your inputs (the ticks option seems to only work with numbers). I'm curious as to the "avoid the extra processing" comment. With jQuery it would be as easy as:

    $.map(dateValues, 
           function(val,idx){
               return [[val,dailyValues[idx]]];
           }
    );
    

    to "merge" the two arrays into point pairs.

提交回复
热议问题