jqPlot legend does not show colors belonging to each series in trend chart?

Experts,

I am using jqPlot to create simple line charts. Each chart contains two series.

When I enable the legend, the legend does not show me the colors which correspond to each series?

Without the colors which correspond to each series the legend is useless.

What am I missing?

Current Code
$(document).ready(function(){
	var line1 = [[date1,value1], [date2,value2], [date3,value3], [date4,value4]];
	var line2 = [[date1,avg], [date2,avg], [date3,avg], [date4,avg]];
	var plot2 = $.jqplot('trend_chart', [line1, line2], {
		seriesDefaults: {
			showMarker: true,
			pointLabels: {
				show:true
			},//END PONT LABELS
			rendererOptions: {
				smooth: true
			}//END RENDEROPTIONS
		},//END SERIES DEFAULTS
		// Size of the grid containing the plot.
		gridDimensions: {
			height: $("#trend_chart").height()*.95,
			width: $("#trend_chart").width()*.70,
		},
		series:[
			{
				label: 'Incoming Calls',
				lineWidth:4, 
				markerOptions:{
					style:'circle'
				}//END MARKER OPTIONS
			},
			{
				label: 'Average Call Volume',
				lineWidth:4, 
				markerOptions:{
					style:'square'
				}//END MARKER OPTIONS
			}
		],//END SERIES
		legend: {
			show: true,
			location: 'ne',
		},
		axes:{
			yaxis:{
				label: 'Call Volume',
				labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
				marginRight: 50,
				pt2px: 10,
				min: 0,
				max: yaxis_max,
				tickInterval: 25,
				tickOptions: {
					formatString: '%.0f',
					showMark: false
				},//END TICK OPTIONS
			},//END YAXIS
			xaxis:{
				renderer: $.jqplot.DateAxisRenderer,
				tickOptions:{
					formatString:'%#m/%#d/%y'
				},//END TICK OPTIONS
				min: min_date,
				max: max_date,
				tickInterval:'1 weeks'
			}//END XAXIS
		},//END AXES
	});//END VAR PLOT2
});//END DOCUMENT READY

Open in new window


Resulting Line Chart:
Image showing current chart output.
evibesmusicAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rainer JeschorCommented:
Hi,
based on your provided (partial) input, I resampled a demo here:
http://jsfiddle.net/EE_RainerJ/ub78obwg/

Could you please post your existing html source (where you add the jqPlot) as well as what versions of jQuery and jqPlot you use?

The result looks different on my demo - so something must be different on your system.

HTH
Rainer
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
evibesmusicAuthor Commented:
@Rainer Jeschor

I am using jQuery 1.11 so I assume that I may need to update my jqplot version. I will test and report back asap.
0
evibesmusicAuthor Commented:
jqPlot version was very outdated.

Rookie maneuver.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.