Skip to content
tbertran edited this page Oct 23, 2014 · 2 revisions

Label on y-axis

The following settings are available: yScaleLabel, yScaleLabelFontFamily, yScaleLabelFontSize, yScaleLabelFontStyle, yScaleLabelFontColor

y axis label screenshot

Various improvements to tooltips

I implemented them specifically for the Line chart but the settings are at the Core-level so they could as easily get implemented for other types of chart.

Option for a shadow around the tooltip box

When Chart-level option tooltipShadowColor is populated with color code, it adds a shadow. Currently, shadowBlur = 4 is used. See screenshot below.

Display custom values (i-e non-numeric, non-nulls)

The stable version of Chart.js already has the ability to handle sparse datasets (with null values). This feature adds the ability to have data points that are strings (I use that to display "N/A", "Not Certified", "Redacted", etc.). The data point will be plotted on the chart exactly the same as a null value, but the tooltip will reflect its actual meaning.

image

Option to display the tooltip box only with values of data points within a certain pixel range

By setting tooltipCursorSensitive to true, only the data points within tooltipCursorHitPixels will be displayed in the tooltip box. Except for data points with a custom value (those not numeric, not null), those will display anywhere on the y-axis, same as the current default.

Increase scale for high-variation datasets

By setting increaseScaleForHighVariations to true, high variation datasets will get flattened.

Before: image

After : image