Apex charts dataLabel styling is not working
See original GitHub issueCodepen
I want to add a style for those dataLabels.
I tried out this as mentioned in the docs
options : {
...
dataLabels: {
enabled: true,
enabledOnSeries: undefined,
formatter: function (val, opts) {
return val
},
textAnchor: 'middle',
distributed: false,
offsetX: 0,
offsetY: 0,
style: {
fontSize: '14px',
fontFamily: 'Helvetica, Arial, sans-serif',
fontWeight: 'bold',
colors: undefined
},
background: {
enabled: true,
foreColor: '#fff',
padding: 4,
borderRadius: 2,
borderWidth: 1,
borderColor: '#fff',
opacity: 0.9,
dropShadow: {
enabled: false,
top: 1,
left: 1,
blur: 1,
color: '#000',
opacity: 0.45
}
}
},
...
}
both style and background are not working !!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
dataLabels - ApexCharts.js
Similar to plotOptions.bar.distributed , this option makes each data-label discrete. So, when you provide an array of colors in datalabels.style.colors ...
Read more >Apex charts text align styling in dataLabel - Stack Overflow
How to make align to right side for values in chart ? This is my chart: my chart. I'm trying to separate the...
Read more >ApexCharts when no data, annotation is shown - CodePen
label : {. 12. borderColor: 'transparent',. 13. style: {. 14. color: "red",. 15. background: 'transparent',. 16. },. 17. text: "Annotation text",.
Read more >Data Visualization With ApexCharts - Smashing Magazine
Here is a sample of how the components of an ApexChart work together. ... Next, we define the style and font-size of the...
Read more >ApexCharts & Bootstrap Integration by Keenthemes
ApexCharts ' CSS and Javascript files are bundled in the global style and ... data: [44, 55, 57, 56, 61, 58] }, {...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hello @junedchhipa It’s not really clear if that is a bug or a new feature ?
According to the doc. it seems that this should be working so this issue seems like a bug to me. If that’s the case, shouldn’t this issue stay open till the bug is addressed and merged ?
Thanks
It seems background for the pie/donut labels doesn’t work in pie/donut charts.
For the forecolors, you can try