Hello.
I use Phoenix 1.8 (with the new theme switching feature) with LiveView 1.1.4.
To draw charts I use the js library apexchart, which has the ability to set a dark or light theme.
I call the library inside liveview something like this:
<.chart
id="chart"
chartset={%{
chart: %{
type: "line",
},
theme: %{
mode: @theme,
},
series: [%{
name: "Series",
data: @series
}],
xaxis: %{
categories: @categories,
}
}}
/>
How can I get the current theme to pass into a variable @theme?
Is there any other way to pass the current theme to a third-party JS library?






















