Skip to content

Commit a5d2b05

Browse files
committed
minor #1001 Fix custom controller scale documentation (DennisdeBest)
This PR was merged into the 2.x branch. Discussion ---------- Fix custom controller scale documentation In a custom stimulus controller to update the configuration for the scales it is not an array but just an object, if not you get the following error : Invalid scale configuration for scale | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | License | MIT Commits ------- 39aa338 Update index.rst
2 parents c24c80c + 39aa338 commit a5d2b05

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Chartjs/doc/index.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,13 @@ custom Stimulus controller:
184184
185185
// For instance you can format Y axis
186186
event.detail.config.options.scales = {
187-
yAxes: [
188-
{
189-
ticks: {
190-
callback: function (value, index, values) {
191-
/* ... */
192-
},
187+
y: {
188+
ticks: {
189+
callback: function (value, index, values) {
190+
/* ... */
193191
},
194192
},
195-
],
193+
},
196194
};
197195
}
198196

0 commit comments

Comments
 (0)