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
The problem is that the LinearScale always puts the property type: "linear" into the the tick config, and chartjs then wants me to configure all the other stuff for the ticks/scale and no data is displayed if not.
If I remove the the property from the chart JSON config object before initializing the Chart with delete json.options.scales.xAxes[0].type it's formating as expected.
Workaround for me was creating a class TypelessLinearScale extends LinearScale with @JsonIgnore on an overriden getType().
Not sure how to handle this problem "nicely", a type-less Scale would be nice, but setOptions(...) on LineOptions needs a LinearScale and not a Scale<?> or something.
The text was updated successfully, but these errors were encountered:
benweidig
changed the title
Styling LinearAxis needs full config of axis
Styling LinearScale needs full config of axis
Nov 2, 2017
I looked around in the chart.js repo and found this issue (chartjs/Chart.js#4687) and it seems that "I'm holding it wrong" and should have used a category axis
Hi,
I'm trying to style a linear scale (just
fontStyle
andfontColor
) of a LineChart:The problem is that the LinearScale always puts the property
type: "linear"
into the the tick config, and chartjs then wants me to configure all the other stuff for the ticks/scale and no data is displayed if not.If I remove the the property from the chart JSON config object before initializing the Chart with
delete json.options.scales.xAxes[0].type
it's formating as expected.Workaround for me was creating a
class TypelessLinearScale extends LinearScale
with@JsonIgnore
on an overridengetType()
.Not sure how to handle this problem "nicely", a type-less Scale would be nice, but
setOptions(...)
onLineOptions
needs aLinearScale
and not aScale<?>
or something.The text was updated successfully, but these errors were encountered: