We wrap up the chart and move on to working on the stacked area chart from yesterday. We will create an event handler for the
jqplotDataHighlight method. When a user hovers over a stacked area, we will populate a table with the current series data.
There are a few differences between this event handler and the one we used with our bar chart. We will use
seriesIndex instead of
pointIndex to access the data we need. For stacked charts, nothing is passed through
pointIndex, so it will return
null. Also, with the
data parameter, it is an array of all the data points for the highlighted line.
Since we passed in date values originally, we might expect to have access to them in our callback. Not quite; ...