Monday, 15 August 2011

javascript - Square Line Chart / Step Chart jqplot -


I need to plot the data of 3 series, first is a row and the second is just 2 points, though line one step Chart (should be instead of line drawing from point to point, it should draw a horizontal line and then go to the value)

How can I get it with a junkplate?

 < Code> $ (document) .ready (function () {var plot1 = $ .jqplot ('chart1', [[3,7,9,1,4,6,8,2, 5]]];}) ;  

down The AE code will produce the blue line on the graph below, instead I need a green row.

Already suggesting to subtract a small amount of X value (0.001 in this example) from the given answer) to prevent triangle effect. E. But it is not quite accurate and it can only be seen as a workaround.

The triangle effect is due to the sorting done by jqPlot. Ding line chart If the data has already been sorted before feeding it to jqPlot, then sorting can be disabled for JunkPluts, as the Sort Data attribute is incorrect, see

This sorting will stop the issue and hence there will be no triangle effect!

You may also want to hide point markers because the jackplate does not know the difference between the real digits and the artificial points of our injection.

  var data = [3, 7, 9, 1, 4, 6, 8, 2, 5]; Var number = [[1, data [0]]]; For (var i = 1; i & lt; data lamps; i ++) {points.push ([i + 1, data [i - 1]]); Points. Pat ([i + 1, data [i]]); } Var plot1 = $ .jqplot ('chart1', [points], {sortData: false, series defaults: {showMarker: false}});  

If you also want to get the right point marker, then I see that the only option is changing the rendering argument, eg. Write a Phase Charts Plugin.

For reference, also see the answer in the following post:


No comments:

Post a Comment