Reputation: 395
I am generating a line graph with two lines on it using the function below. My problem is that it is not showing the x-axis label (I've tried it both as a variable and hard coded). It is also not formatting the x-axis values per the tickOptions. I have a seperate plot that is using date values on the x-axis instead of regular numerical and it has no issues. Any advice would be much appreciated.
function toolProbPlot(probDivTitle,probValues,probPlotTitle,probX,legendLabel) {
return plot = $.jqplot(probDivTitle,probValues, {
title: probPlotTitle,
seriesColors:[noColor,yesColor],
legend: {
show: true,
location: legendLocation,
placement: legendPlacement,
labels: legendLabel
},
axis: {
xaxis: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
showLabel: true,
label: probX,
tickOptions: {formatString: '%.4f'}
},
yaxis: {
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
}
}
});
}
Upvotes: 0
Views: 686
Reputation: 1851
Typo: axis: {
should be axes: {
Also make sure to have included all the required .js plugins
Upvotes: 3