Apexcharts.js: Change color of yaxis labels at horizontal bar chart don't work

Created on 18 Nov 2018  路  9Comments  路  Source: apexcharts/apexcharts.js

The setting for yaxis label color is not applied for horizontal bar chart (vertical bar chart works)

Here is the codepen. Yaxis label should be green, but they are not.
https://codepen.io/punkt2/pen/ZmJVdR

bug

All 9 comments

As far i understand your change, it fixes the color for the title not the labels, right?
I checked out master and the color is still not applying for yaxis labels.

Hi @punkt2
Sorry for not updating this thread, but the change isn't pushed to npm. When I will create the new build 2.2.3 - this will be working for labels and titles both

https://github.com/apexcharts/apexcharts.js/commit/40cd62fcc196f9568e82c6dcf50a7054433a2537#diff-68a9703f7bce197c9e7ed170e3704aed shows the changes in src/modules/axes/XAxis.js - Maybe you got confused as Horizontal Bar Chart's Y-axis is drawn in Xaxis file (as technically it is just an inversed X-Axis) :)

True, i didn't have the latest changes. Anyway, thanks and I will wait for the next release.

Hi this isn't working on Y axis

but it does work on X axis

working with "apexcharts": "^3.15.2",
React

still can't change Y axis label color, using version ^3.15.6, anything on this? i need it for when changing theme from light to dark.

edit. just tested again and Yaxis label color only changes within responsive options.

yaxis: {
  labels: {
    style: {
      colors: '#111'
    }
  }
}

This should work even in a horizontal bar chart.

@metalsadman

We recently updated our web-pack. Not entirely sure what change there was but now the Y axis is working for us.

the color of yaxis title not working with apex charts
I tried all the possible solutions .pls help

Is there a way to change the color depending on a condition?
i.e. if the value is higher than 50 then color red if not then color black

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maasha picture maasha  路  3Comments

pribilinskiy picture pribilinskiy  路  3Comments

thellimist picture thellimist  路  3Comments

jeroenpol picture jeroenpol  路  3Comments

tcarlsen picture tcarlsen  路  3Comments