I have made a jqplot which has one line which is dynamical created from some question and 2 others, an industry standard and a best practices line.
I want to be able to change the color of the dynamical created line when it goes below the industry standard and change it again if it goes above the best practices line.
Is this possible or am I trying to take this too far?
Thank you all in advance for your response.
here is some of my code:
//Get radio Values var values = $('input:radio:checked').map(function () {
return this.value; }).get();
var line1 =[[1,values[0]], [2,values[1]], [3,values[2]], [4,values[3]], [5,values[4]]];
var line2 =[[1,4],[2,5],[3,4],[4,5],[5,5]];
var line3 =[[1,1],[2,2],[3,2],[4,4],[5,4]];
$.jqplot('chartdiv', [line2,line1,line3],
{ title:'Best Practices Chart', highlighter: {useAxesFormatters: true, showTooltip: true,
tooltipLocation: 'nw',
lineWidthAdjust: 2.5, },
grid:{
drawGridLines: true,
backgroundColor: '#FFFFFF'},//plot labels axes:{yaxis:{ticks:['Poor','Low', 'Medium', 'High', 'Best Practice'], renderer: $.jqplot.CategoryAxisRenderer,
xaxis:{ticks:['DP Officer', 'Policies & Procedures', 'Awareness & Education', 'Information Security', 'Data Quality'], renderer: $.jqplot.CategoryAxisRenderer,
seriesColors: ["#00FF00", "#000000", "#0000FF"],legend: {
show: true,
}, series: [
{markerOptions: {style:'dimaond'}, label: 'Best Practise'},
{label: 'Your Practise'},
{markerOptions: {style:'filledSquare'}, label: 'Average Practise'},],
});
}); });