CSV & Flot with only 1 data axe
I have a csv file that contains numbers separated by comma.
1.23,2.34,4.8,15.2,8.9...
You get the point.
So I don't have both axes, so I want X to be automatic, continuos, incremental...
Like 1,2,3,4,5,6,...
And Y to be my CSV values. (I cannot modify the CSV)
- $(function () {
- var options = {
- lines: { show: true },
- points: { show: true },
- xaxis: { tickDecimals: 0, tickSize: 1 },
- yaxis: { ticks: 20, min: 0, max: 80 }
- };
- $.get('memdata.csv', function(data){
- var tokens = jQuery.csv()(data);
- $.plot($("#memory"),tokens,options);
- });
- });
But it takes the CSV values in pairs...