Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radial Bar Chart rendered differently on Firefox vs. Chrome #1243

Closed
rvergar7 opened this issue Jan 22, 2020 · 8 comments · May be fixed by cherrypoppins226/tfjs-linear-regression-demo#1
Closed
Labels
bug Something isn't working

Comments

@rvergar7
Copy link

Hello, thanks in advance for this great library.

I'm currently working on a document where I need to import a Radial Bar Chart via the dataURI method. During this I noticed that the Radial Bar Chart is rendered differently on Firefox vs. Chrome. On Firefox there appears to be some extra whitespace below the chart.

This doesn't cause too much of an issue using a browser but when I'm generating the document, if the user uses Firefox then the formatting is thrown off by this whitespace. I am using several different charts in the document and the Radial Bar Chart is the only one that has this behavior.

Codepen: https://codepen.io/rvergar7/pen/xxbMVjr

Chrome:
chrome render

Firefox
firefox render

@junedchhipa junedchhipa added the bug Something isn't working label Jan 23, 2020
@junedchhipa
Copy link
Contributor

I checked in Firefox and confirm the bug.
It will be addressed soon.

@cymig
Copy link

cymig commented May 29, 2020

HI @junedchhipa,

It feels like the bug is still there in apexcharts v3.19.2. There's still some extra whitespace below the chart on Firefox. In addition, Radial Charts have the bottom part cut off on Chrome. Not sure if this is a known bug?

Thanks

On my local project:
Firefox (Version 76.0.1 (64-bit))
image

Chrome (Version 83.0.4103.61 (Official Build) (64-bit))
image

This is replicable here on codepen for reference:
https://codepen.io/apexcharts/pen/VEGyGx

@junedchhipa
Copy link
Contributor

@cymig Your codepen link is wrong. Please provide the correct codepen link.

@junedchhipa junedchhipa reopened this May 30, 2020
@cymig
Copy link

cymig commented Jun 4, 2020

@cymig Your codepen link is wrong. Please provide the correct codepen link.

Hi @junedchhipa,

My apologies for the wrong link. I just set a new demo URL for you to test: https://van-footprint.herokuapp.com/#/results

  1. On Firefox, you'll notice some extra white-space below the chart.
  2. On Chrome, I suspect the "bottom cut off" bug happens when using a negative value for startAngle: -90,.
plotOptions: {
          radialBar: {
            offsetY: 0,
            startAngle: -90,
            endAngle: 180,
            hollow: {
              margin: 8,
              size: "40%",
              background: "transparent",
              image: undefined
            },
            dataLabels: {
              name: {
                show: false
              },
              value: {
                show: false
              }
            }
          }
        },
        labels: getter,
        legend: {
          show: true,
          floating: true,
          fontSize: "11px",
          fontFamily: "Quicksand",
          position: "top",
          offsetX: -170,
          offsetY: 180,
          labels: {
            useSeriesColors: true
          },
          markers: {
            width: 0
          },
          itemMargin: {
            vertical: 0,
            horizontal: 0
          }
        },
        colors: ["#ABA1A1", "#7FBFD3"]
      };
    }

Thanks

@pierre-alain-b
Copy link
Contributor

I have the same behavior:
FF 88 gives:
image

Chromium 89 gives:
image

@pierre-alain-b
Copy link
Contributor

pierre-alain-b commented Apr 25, 2021

The issue vanished when I added
sparkline: { enabled: true }
in the chart options.

@pierre-alain-b
Copy link
Contributor

I guess this issue can now be closed again.

@digitalmouse
Copy link

digitalmouse commented Mar 9, 2022

Noting this here: using apexcharts v3.33.0 in Node with Vue2 and Vuetify

Bottom cutoff still appears in latest Chrome 99.0.4844.51 (Official Build) (64-bit) but not in Firefox 98.0b10 (64-bit).

It seems to revolve around a negative startAngle, as combinations using positive numbers work just fine.

Using startAngle: -180, endAngle: 90 in plotOptions{} :

chrome_GLTdU8FxrI

Oddly enough, the cutoff disappears when I change the endAngle to 103 :

chrome_E7BfREDv2d

As I experimented with reducing the endAngle back down from 110 to 90, the cutoff gradually gets smaller until around 103-104 it stops 'shrinking'. At least enough that you never notice it. :-)

NOTE: adding the sparkline trick from @pierre-alain-b did not work in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants