Sunday, 15 February 2015

javascript - Flot line Chart without date/time -



javascript - Flot line Chart without date/time -

could please help me, trying create flot line chart, comparision 2 values. possible create without time?. have searched everywhere, unable find line chart without date/time.

var options = { series: { lines: { show: true }, points: { show: true } }, grid: { hoverable: true, clickable: true }, xaxis: { mode: "time", timeformat: "%d/%m", ticksize: [1, "day"] }, yaxis: { min: 0 }, legend: { show: false }, selection: { mode: "x" } };

instead of time or date, need show own info 'john', 'amit','gourav' in x axis.

please help me.

you can utilize category mode (category plugin: example, example code).

basic code (see fiddle result):

var info = [ ['john', 13], ['amit', 17], ['gourav', 9] ]; $.plot('#div', [ info ], { series: { lines: { show: true }, points: { show: true } }, xaxis: { mode: 'categories' } });

javascript jquery flot

No comments:

Post a Comment