Chart.js
Chart.js copied to clipboard
Documentation search does not include all relevant results
I was looking at documentation for changing color of the fill based on whether it is above or below 0 and I found this example https://www.chartjs.org/docs/latest/samples/line/segments.html which has "segment" field in it that does it for the line(not for the fill). But when I go to documentation, to see if it supports fill, https://www.chartjs.org/docs/latest/general/data-structures.html there is no mention of this property(and others from the example). In the API documentation(which is utterly useless) there is https://www.chartjs.org/docs/latest/api/interfaces/Segment.html but has no properties from the example whatsoever. In other words, I find the documentation quite useless.
The segment interface does support the backgroundColor
property. This is documented in https://www.chartjs.org/docs/latest/charts/line.html#segment
In that sample above, backgroundColor
is set to the same function as borderColor
and fill
is set to `true.
Thanks, that is very helpful. But that still does not change the incoherence in the docs. Even if i search for "segment" it shows me the api page and the example but not the page you linked to.