jquery - Javascript flot not showing data series -


i'm using flot display data on bar graph. data isn't displaying reason, , have no idea why.

my data series correct far can see, still won't show.

jsfiddle: http://jsfiddle.net/9jhpyne4/1/

code:

var plotdata = [     [1, 12.35],     [2, 34.6],     [3, 56.7],     [4, 4.35] ];   $.plot($("#main-chart"), plotdata, { bars: {     show: true,     linewidth: 0,     fill: true,     fillcolor: {         colors: [{             opacity: 0.8         }, {             opacity: 0.1         }]     } } }); 

data pass plot function needs have metadata (like label , color):

var data = [     [1, 12.35],     [2, 34.6],     [3, 56.7],     [4, 4.35] ]; var dataset = [{ label: "a label", data: data, color: "red" }];  

https://jsfiddle.net/9jhpyne4/3/


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -