I'm trying to show only 5 digits with the X axis, with the capable rendering - I want the user to Points above 5 digits
I have disabled the zoom, but my problem is that the more data I add, the attempt of the digit starts with x axis and begins to grow.
So if I load 20 points of data, then instead of showing 5 digits, the user should only pan 15 others, X-axis "Zoom as much" as possible to several points to show up.
Also, how do I set the starting position? If there are 20 points in it, and only the digits are visible, then how do I set the approach to start at 10 to 15 points, then the user returns to the first 10 digits, and goes for the remaining 5 is?
xaxis: {panRange: [
panorange
to pan and min & amp; Define maximum
start limit.
Edit: You can specify an array with the tick name:
var ticks = [[1, 'one'] , [2, 'two'],
and use it like this:
xaxis: {... ticks: ticks,
See code snippet below for a full example:
$ (function () {var data = [[1, 2], [ 2, 3], [3, 1], [4, 4], [5, 2], [6, 3], [7, 3], [8, 2], [9, 1] [10, 1 ], [11, 3], [12, 4], [13, 2], [14, 2], [15, 4], [16, 3], [17, 3], [18, 1] [19, 4]] var ticks = [[1, 'one'], [2] 'two', [3, 't [9] 'nine', [8, 'eight'], [9, 'nine'], [4, 'four'], [5, 'five'], [6, '6]], [7, ], [11, 'ten'], [11, 'eleven'], [12, 'twelve'], [13, 'thirah'], [14, 'fourteen'], [15, 'fifteen] , Var option = {Series: {points: {show: true}, [16, 'sixteen'], [17] 'seventeen', [18, 'eighteen]], [19] Lines: {show: true}}, xxis: {panoraz: [0, 20], minimum: 5, max: 10, tick: tick, tick decimals: 0, yaxis: {panRange: [0, 5], minimum : 0, Max: 5, Tick Decimals: 0}, Zoom: {Interactive: False}, Pan: {Interactive: true}}; Var plot = $. Plot ('# Placeholder', [Data], Options); });
#placeholder {width: 400px; Height: 300px; }
& lt; Script src = "https://ajax.googleapis.com/ajax/libs/JQuery/1.1.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://www.flotcharts.org/flot/jquery.flot.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://www.flotcharts.org/flot/jquery.flot.navigate.js" & gt; & Lt; / Script & gt; & Lt; Div id = "placeholder" & gt; & Lt; / Div & gt;
Comments
Post a Comment