Giter Site home page Giter Site logo

add legends about chart.js HOT 4 CLOSED

chartjs avatar chartjs commented on April 29, 2024
add legends

from chart.js.

Comments (4)

smartgokul avatar smartgokul commented on April 29, 2024 1

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

from chart.js.

nnnick avatar nnnick commented on April 29, 2024

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.

from chart.js.

raghvendrasinghtomar avatar raghvendrasinghtomar commented on April 29, 2024

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

from chart.js.

liddellj avatar liddellj commented on April 29, 2024

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.

from chart.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.