Display xtick values with highlighter and tooltipContentEditor
I use jqplot to display a histogram (bar chart). To have xticks displaying
the values between the bins, I use an other array for the xticks than I
use as input for plotting. For example: x-data: 351, y-data: 2 and for the
ticks an other array with the values 333 and 370 as borders of this bin.
I'd like to use the highlighter plug-in to display the counts of each bin
and the border values. At the moment I'm using tooltipContentEditor with
function tooltipContentEditor(str, seriesIndex, pointIndex, plot) {
return "counts: "+ plot.data[seriesIndex][pointIndex][1] + "<br /> " +
"mean of bin: " + plot.data[seriesIndex][pointIndex][0];
}
to display the number of counts and the central x-axis value of the
selected bin (see image).
Is there a similar way to display the border values of the bins with
tooltipContentEditor? I'm going to plot a lot of diagrams per page and so
it would be nice, if I could do it in a similar way than above. I could
use
function tooltipContentEditor(str, seriesIndex, pointIndex, plot) {
return "Counts: " + plot.data[seriesIndex][pointIndex][1] + "<br />Lower
Limit " + data_border_value_bin[pointIndex] + "<br />Upper Limit: " +
data_border_value_bin[pointIndex + 1];
}
but then I would have to keep the array data_border_value_bin for each
plot (it is different for each plot). But I guess the xtick-values are
stored somewhere and I just don't know how to access it.
Thank you for your help.
No comments:
Post a Comment