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

Set label of piechart/donut chart using parsing #11772

Open
anuj9196 opened this issue May 11, 2024 · 0 comments
Open

Set label of piechart/donut chart using parsing #11772

anuj9196 opened this issue May 11, 2024 · 0 comments

Comments

@anuj9196
Copy link

anuj9196 commented May 11, 2024

Feature Proposal

The line chart supports the parsing of data as

dataset = [
{
    data: [{
      label: 'Sale',
      value: 15
    }, {
      label: 'Purchase',
      value: 20
    }]]
}

...
options = {
  parsing: {
    xAxisKey: 'label',
    yAxisKey: 'value'
  }
}

But in the case of a pie chart and doughnut chart, there is only one parsing key

options = {
  parsing: {
    key: 'value'
  }
}

But how can I set the label for in this case?

As a workaround, I still need to do data processing to extra labels and set labels explicitly.

Possible Implementation

On option to set label to the data of pie chart as well.

e.g.,

options = {
  parsing: {
    key: 'value',
    label: 'label'
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant