You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a line chart with numeric y axis. To implement a custom tooltip for this chart, I have attached a custom callback to tooltips section of chart options. As it mentioned in docs, this callback receives a tooltipModel object, with dataPoints object of type tooltipItem[] inside. Chartjs doc says that xLabel and yLabel fields of tooltipItem must be of type string. But in fact I have yLabel field of type number.
Here is one of the received tooltipItem object:
As I am writing OCaml bindings for Chartjs, types of object fields matter. Are there any reasons why these fields are of the same type as they are stored in a dataset or it is just a bug? At least, I think it is not good that there is some discrepancy between documentation and actual behaviour.
Sorry for not attaching a live example or code to reproduce a bug. If it is essential, I will attach it later.
The text was updated successfully, but these errors were encountered:
I have a line chart with numeric y axis. To implement a custom tooltip for this chart, I have attached a
custom
callback totooltips
section of chart options. As it mentioned in docs, this callback receives atooltipModel
object, withdataPoints
object of typetooltipItem[]
inside. Chartjs doc says thatxLabel
andyLabel
fields oftooltipItem
must be of typestring
. But in fact I haveyLabel
field of typenumber
.Here is one of the received
tooltipItem
object:Expected Behavior
xLabel
andyLabel
fields must be of typestring
Current Behavior
yLabel
field is of typenumber
Context
As I am writing OCaml bindings for Chartjs, types of object fields matter. Are there any reasons why these fields are of the same type as they are stored in a dataset or it is just a bug? At least, I think it is not good that there is some discrepancy between documentation and actual behaviour.
Sorry for not attaching a live example or code to reproduce a bug. If it is essential, I will attach it later.
The text was updated successfully, but these errors were encountered: