You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

241 lines
7.0 KiB
JavaScript

/**
* This is a charting wrapper, it is designed to simplify the interface to d3
* dependencies:
'https://the-phi.com/pub/js/jqplot/plugins/jqplot.pointLabels.js',
min:0,
tickOptions:{
showGridline: false
},
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
}
},
legend:{}
} ;
return options;
}
/**
* @id DOM identifier
* @series matrix of values to be ploted
* @labels xaxis labels
* @lnames names of series (vectors in the matrix)
*/
jx.jqplot.line.render = function(id,series,labels,lnames){
jx.dom.set.value(id,'')
var options = jx.jqplot.line.options() ;
options.axes.xaxis.ticks = labels ;
if(series.length > 1){
options.legend.show = true
options.legend.location = 'ne'
options.legend.placement = 'outsideGrid'
options.series = lnames;
}
options.series = lnames;
options.stackSeries= true,
// options.seriesDefaults.label = lnames[0];
options.seriesDefaults.pointLabels.show= false;