Open StephenOTT opened 2 months ago
Hi,
It's a tradeoff what options to expose with razor syntax, currently we have no plans o expose theme with razor syntax. One technique to make thing easier is to have a service or a singleton class to provide default chart options.
The complexity with the singleton approach is dealing with multiple charts per page.
You end up having to re-write all of the infra to understand when and how to call the theme change per chart in a single page for an overall app setting.
Even if it was not specific a theme change exposure, but some "something changed that needs chart action" that takes a Func so we can change settings generically across multiple instances of charts.
Currently it feels like you have to create factory-factories of chart settings, keep track of all of the refs and then call each to re-render.
Is there a solution to bind the theme mode without having to add handling for manually re-rendering each chart, etc?
Would be nice if there was just a
@bind-IsDark="@isDark"
that could be setup instead of having to setting up themes, callbacks, etc.