Replies: 2 comments 5 replies
-
Sorry I just realize I made such a rookie mistake. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Udemology if I may jump in this discussion, as far as I understood, your plugin should work only with horizontal bar controllers. I don't know if you want to have a generic plugin which can manage all cases where you can have an horizontal bar controllers.
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to check in beforeInit if a bar is horizontal in a plugin?
I want to only activate the plugin if the conditions are met, which is
type: 'bar'
andindexAxis: 'y'
.beforeInit() recognizes the chart type:
chart.config.type !== 'bar'
but when I add a second conditionchart.config.options.indexAxis !== 'y'
it ignores the last condition.I guess it needs to load all the details beforehand, because it does recognizes it on beforeDatasetsDraw().
However, by doing that I get the console.warn loaded twice due to how beforeDatasetsDraw() works.
Any suggestions? Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions