Skip to content

toggleSeries is not a function #167

@strogiyotec

Description

@strogiyotec

Describe the bug
I am trying to set up the library with my Vaadin Flow 23 project.
Java version is 11
Vaadin flow is 23.2.0
Apex version is 23.0.1
I am using the same code as in the example directory that generates BarChart with 4 buttons, when I press toggle button Vaadin shows this error

Exception is thrown during JavaScript execution. Stacktrace will be dumped separately.
The error has occurred in the JS code: '$0, $1, return $0.toggleSeries($1)'
TypeError: $0.toggleSeries is not a function (http://localhost:8083/VAADIN/@fs/home/vaadin_app/node_modules/.vite/deps/FlowClient-ASKNNSCM.js?v=a501aa5f line 7492 > Function:3:11)

Steps or code example to Reproduce
``
ApexChartsBuilder rangedVerticalBarChartBuilder = new RangedVerticalBarChartExample();
ApexCharts verticalBarChartExample = rangedVerticalBarChartBuilder
.withTitle(TitleSubtitleBuilder.get().withText("Revenue Example").build())
.build();

    Button toggleButton = new Button("Toggle", click -> verticalBarChartExample.toggleSeries("Revenue"));
    HorizontalLayout hl = new HorizontalLayout();
    hl.add(toggleButton);
    this.add(verticalBarChartExample, new Span("Revenue series control: "), hl);

...//setup


**Expected behavior**
I expect to see the chart

**Screenshots**
![image](https://github.com/appreciated/apexcharts-flow/assets/20584185/7981bc99-5c47-48c7-be22-692cdc4423a7)

**Desktop (please complete the following information):**
 - Linux
 - Firefox
 - Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions