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

add legends #3

Closed
mef opened this issue Mar 18, 2013 · 4 comments
Closed

add legends #3

mef opened this issue Mar 18, 2013 · 4 comments

Comments

@mef
Copy link

mef commented Mar 18, 2013

I did not find any hint on how to include a legend in the documentation.

Is this supported? Charts look good, but a legend is needed to let reader know about the data series he is looking at...

@nnnick
Copy link
Member

nnnick commented Mar 18, 2013

I haven't planned to add chart legends onto the graph canvas itself, as I felt it would take too much real estate space. It would also be a lot more accessible to have legends as HTML rather than a bitmap canvas.

Chances are, it would be impossible to create enough customisation options to fit everyones layout and style.

I'd suggest using your data source to generate a legend for your graph that fits your needs.

I'd be really interested in seeing what you come up with, and maybe creating a legend add on for Chart.js.

@nnnick nnnick closed this as completed Mar 18, 2013
krampstudio pushed a commit to krampstudio/Chart.js that referenced this issue Apr 5, 2013
krampstudio pushed a commit to krampstudio/Chart.js that referenced this issue Apr 5, 2013
@raghvendrasinghtomar
Copy link

I am in some urgent need to show legends at my Bar chart, but i don't get any code through which i can achieve this, Please guide me for same. I really appreciate any help on this.
( fixes provided by you only for the tool tip on the charts. (workaround) Is there any way i can show permanent tool tip on my chart, i mean a kind of tool tip which is been shown to all bars independents of user mouse events.

leigends

@liddellj
Copy link

For anyone else confused by this, chart.js provides a generateLegend function which provides a HTML string of a legend for a given chart, based on a legendTemplate option for the chart. It's covered in the documentation.

@smartgokul
Copy link

can any one tell me to is there any possible to display values instead of string values.
for example : the bar chart have two axis like x and y. normally x have string and y have value of x axis string. But , the y can able to show text instead of range values.

chart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants