Closed aospinagcg closed 2 years ago
I am also having this issue with the donut chart. I am trying to render the chart with a section selected and labels in the center. The labels do not show until I mouse over the chart, is there a way to fix this?
Is there an update on this? Still happening in version 3.26.0
.
Or is there any workaround, yet?
Is there an update on this? Still happening in version
3.26.0
.Or is there any workaround, yet?
The tooltip only shows when the user directly interacts with the chart. It doesn't get displayed on the data-point selection. It's not a bug but the feature you're expecting isn't there. Originally posted by @junedchhipa in https://github.com/apexcharts/apexcharts.js/issues/1361#issuecomment-595896423
Hope this helps, maybe its the same for labels.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi guys, I found a hack. You can use total.This is the labels property.
total: { show: true, label: 'Token', formatter: (w) => { return this.selectedUserToken.usd + ' $' } }
We also need a variable that will store the current value. Then we will write this variable in total.formatter (it will be reactive and the value will change accordingly). Label is more difficult. We need to create a function to change to change our a variable and also change the label there. Something like this
selectUserToken (token) { this.selectedUserToken = token this.apexTokenPieChartOptions.plotOptions.pie.donut.labels.total.label = token.symbol }
Hi, Another hack : Call toggleDataPointSelection 3 times, it works !
@benjamin-aubry you helped a lot! thanks
Codepen
https://codepen.io/aospinagcg/pen/gOOBdER
Explanation
What is the behavior you expect?
What is happening instead?
The method should show the name and value of the series when in plotOptions they are showing, currently only expand the label