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 was trying to suffix a string to the XAxis entries, so tried to use the formatter field on the Axis Label, in which none of the docs placeholders worked (it rendered the placeholder as a text).
Docs
I tried to find the Axis Labelformatter placeholders values in the Configuration docs:
Translated to english (it is also missing the placeholder values on the english docs file):
Tag content string template formatter. Line breaks with \n are supported. Template variables are: {.}: dot mark. {a}: Series name. {a}: Series name. {b}: Category value or data name. {c}: data value. {d}: Percentage. {e}: data name. {f}: data sum. Example: "{b}:{c}"
Solution
While searching the other formatter fields, the Legend.formatter mentioned the {value} placeholder while also mentioning the template placeholders on Tooltip.itemFormatter (another related issue #290).
I tried using the {value} placeholder and it worked!
I also found this information while searching the FAQ files, but the english FAQ does not have the AxisLabelformatter description, which is present in the chinese FAQ.
Translated to english (it is missing the formatter segment on the english FAQ file):
How to make the Y axis display multiple decimal places
Answer: Set the formatter in AxisLabel under Axis to {value:f1} or {value:f2}. Versions 1.5.0 and above are set via numericFormatter.
Suggestion
It would be nice to have the template placeholders for the AxisLabelformatter mentioned in the FAQ also documented in the Configuration docs (namely the {value} placeholder) where applicable.
The text was updated successfully, but these errors were encountered:
Context
I was trying to suffix a string to the
XAxis
entries, so tried to use theformatter
field on theAxis Label
, in which none of the docs placeholders worked (it rendered the placeholder as a text).Docs
I tried to find the
Axis Label
formatter
placeholders values in the Configuration docs:XAxis
Axis
Axis.axisLabel
AxisLabel
AxisLabel
had no mention of aformatter
so followed toLabelStyle
LabelStyle.formatter
Description for
LabelStyle.formatter
on the docs:Translated to english (it is also missing the placeholder values on the english docs file):
Solution
While searching the other
formatter
fields, theLegend.formatter
mentioned the{value}
placeholder while also mentioning the template placeholders onTooltip.itemFormatter
(another related issue #290).I tried using the
{value}
placeholder and it worked!I also found this information while searching the FAQ files, but the english FAQ does not have the
AxisLabel
formatter
description, which is present in the chinese FAQ.From chinese FAQ file:
Translated to english (it is missing the
formatter
segment on the english FAQ file):Suggestion
It would be nice to have the template placeholders for the
AxisLabel
formatter
mentioned in the FAQ also documented in the Configuration docs (namely the{value}
placeholder) where applicable.The text was updated successfully, but these errors were encountered: