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

label inside each dataset #3305

Closed
secabhi opened this issue Sep 14, 2016 · 6 comments
Closed

label inside each dataset #3305

secabhi opened this issue Sep 14, 2016 · 6 comments

Comments

@secabhi
Copy link

secabhi commented Sep 14, 2016

Hi , I have a two level donut chart , I want have specific labels for 1st level donut chart and specific label for second label . Do we have this?

Each object of dataset should have label

labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
labels: ["d1","d2","d3","d4","d5","d6","d7"]
data: [65, 59, 80, 81, 56, 55, 40],
}
]

-- labels are specific to the data inside dataset

https://jsfiddle.net/zuupzpLL/121/

@etimberg
Copy link
Member

I don't know if this is currently possible. You might be able to override the tooltip methods and do this but the support isn't native.

@arxpoetica
Copy link

It's astonishing to me (please don't think I'm being hyperbolic, I love this library) that labels are NOT explicitly associated with data points. Is this a massive oversight?

@etimberg
Copy link
Member

The issue with labels per dataset becomes, what does the axis display. If there is only 1 dataset it's very clear, but when there are multiple datasets it's not. Having the labels defined for the entire chart data isn't ideal either and is really a legacy from V1.

One possible idea is #3193 which is asking for the labels to be defined by the axis itself.

@arxpoetica
Copy link

arxpoetica commented Oct 18, 2016

I see...it's actually the labels legacy problem (labels defined for the entire chart) that led me here...

@AwaisKazi
Copy link

I'm trying to do the same. I would like to add labels to multiple datasets in order to explain data. Currently, I can only insert labels and the same labels would reflect on the inner datasets too?

@etimberg
Copy link
Member

This can easily be done now by overriding the tooltip callbacks. Example: https://jsfiddle.net/jd4nakuf/2/

I don't think we want to add this to the core at this point.

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

5 participants