appreciated / apexcharts-flow

ApexCharts.js wrapper for the Vaadin Platform
Apache License 2.0
77 stars 47 forks source link

Bar Chart tooltip position moves to top left of chart #166

Open CheeJustin opened 1 year ago

CheeJustin commented 1 year ago

Describe the bug When hovering over a bar on a Bar Chart, the tooptip shows up then jerks to the top left, highlighting an invisible bar on the far left.

Steps or code example to Reproduce

  1. Create a Bar Chart with data (used the Vertical Bar Chart example that's provided: src/test/java/com/github/appreciated/apexcharts/examples/bar/VerticalBarChartExample.java)
  2. Hover over one of the bars
  3. Observe where the tooltip appears and moves to
withChart(ChartBuilder.get().withType(Type.BAR).build())
            .withStroke(StrokeBuilder.get()
                    .withShow(true)
                    .withWidth(2.0)
                    .withColors("transparent")
                    .build())
            .withSeries(new Series<>("Net Profit","44","55","57","56","61","58","63","60","66"),
                    new Series<>("Revenue","76","85","101","98","87","105","91","114","94"),
                    new Series<>("Free Cash Flow","35","41","36","26","45","48","52","53","41"))
            .withXaxis(XAxisBuilder.get().withCategories("Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct").build());

Expected behavior Tooltip should show up on hovered bar, instead of showing up on hovered bar then moving to top left of chart

Screenshots

Screenshot 2023-06-02 at 4 16 56 PM

Desktop (please complete the following information):

mcfar3199 commented 11 months ago

I have the same issue. Does anyone know if there is any action on this or have a work around? When you hover over a series it initially sets the element.style left value to the location of the series, but it immediately moves to the left of the graph. Sometimes it does it a couple times before it stabilizes. If you move the mouse in the slightest it repeats the back and forth.