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

Donut chart Total #4370

Closed
fr4nk3nst3in opened this issue Mar 31, 2024 · 5 comments · Fixed by TanDuy03/ntanduy-cloud#202 · 4 remaining pull requests
Closed

Donut chart Total #4370

fr4nk3nst3in opened this issue Mar 31, 2024 · 5 comments · Fixed by TanDuy03/ntanduy-cloud#202 · 4 remaining pull requests
Labels

Comments

@fr4nk3nst3in
Copy link

fr4nk3nst3in commented Mar 31, 2024

Summary

It would be nice to split the total label in the label/name and this value. The purpose is to use the total value alone without the label/name. The Value should be centered in the middle of donut.

Intended Use Case

Use the total value as Big Numbers without the label. Like:

donut-big-number
@fr4nk3nst3in fr4nk3nst3in added the feature-request New feature or request label Mar 31, 2024
@junedchhipa junedchhipa changed the title Donut chart Totla Donut chart Total Apr 2, 2024
@halfpeeled
Copy link

Hello! I think I may have a simple working solution to this that I will submit a PR for soon, if this issue is still up for grabs. Thanks!

Copy link

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.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2024
@fr4nk3nst3in
Copy link
Author

@halfpeeled @junedchhipa First of all thank for the implementation of feature. I have question about documentation of this feature where I have to put the hideLabel:true. As I seen that this feature has been released in 3.54.0.

@junedchhipa
Copy link
Contributor

You have to set the total label as empty string

options = {
  plotOptions: {
    radialBar: {
      dataLabels: {
        total: {
          label: ""
        }
      }
    }
  }
}

@fr4nk3nst3in
Copy link
Author

fr4nk3nst3in commented Oct 3, 2024

Thanks @junedchhipa .

But what about the pie and their total label? For example if I do following options:

options = {
  plotOptions: {
               pie: {
                  dataLabels: {
                      total: { 
                            label: ''
                      }
            },
            donut: {
                    total: {
                        label: '',
                    },
                },
            },
        }
}

here https://apexcharts.com/docs/options/plotoptions/pie/ is no total option definition under dataLabels. Ans so far I can see a pie/donut is a deferent object as radialBar. Therefore my total for a donut chart without label is still not centered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment