apexcharts.js icon indicating copy to clipboard operation
apexcharts.js copied to clipboard

Rem size unit for the legend and title font-size doesn't work (React)

Open Reytar opened this issue 3 years ago • 3 comments

Description

When using rem size unit for the legend and title, the font-size returns to default/not visible

Steps to Reproduce

  1. Using react-apexcharts
  2. Create area chart with 2 series
  3. Add title and style the font-size to 2 rem
  4. Add legend and style the font-size to 1 rem

Expected Behavior

Expected to see the font-size grow and shrink based on the rem value (root size)

Actual Behavior

The font size returns to default or shrink/behave weird Note that the rem units works when using it on the labels style.

Screenshots

Reproduction Link

https://codesandbox.io/embed/react-basic-example-forked-79ymuf?fontsize=14&hidenavigation=1&theme=dark

Reytar avatar Aug 30 '22 08:08 Reytar

Not working for me either with v3.37.1 using ApexCharts JS

bababash avatar Mar 27 '23 03:03 bababash

I can confirm this also doesn't work on other frameworks (or no framework) not just React. It does, however, work if you specify an exact font size, for example '16'. Also note, every other fontSize (that I've encountered) in ApexCharts works with em/rem values, so this is unique to legend.fontSize.

teckel12 avatar Mar 29 '24 14:03 teckel12

Faced the issue too now with Vue 🤔

jniclas avatar May 22 '24 20:05 jniclas