javascript - Dygraph with non-numeric/non-date x axis -
how can use dygraph create visualization data uses non-numeric/non-date values in x-axis?
i trying visualization of budget data following javascript pulled jsfiddle.
g = new dygraph( // containing div document.getelementbyid("graphdiv"), // csv or path csv file. "departments,2012 actual,2013 actual\n"+ "public works,100,200\n"+ "police,50,150" , { title: 'fort lauderdale budget data' } );
when try run it, following errors in browser javascript debugger console.
"couldn't parse public works date"
"couldn't parse police date"
i did @ axis options provided in dygraphs, seemed address formatting value rather parsing it. realize re-orient axis/data use date x-axis, prefer avoid additional work.
dygraphs assumes first column of data independent (x-axis) variable. might able around writing datahandler
, far easier reorganize data put year in first column.
Comments
Post a Comment