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

Interactive Charts #2

Closed
nuwanbando opened this issue Mar 18, 2013 · 6 comments
Closed

Interactive Charts #2

nuwanbando opened this issue Mar 18, 2013 · 6 comments

Comments

@nuwanbando
Copy link

Hi,

Any plans on making them interactive. Right now, you don't have tooltips etc for mouse pointers yeah ?

Regards,
/Nuwan

@smaresca
Copy link

From http://www.chartjs.org/docs/#generalIssues-chartInteractivity :

"If you are looking to add interaction as a layer to charts, Chart.js is not
the library for you
. A better option would be using SVG, as this will let
you attach event listeners to any of the elements in the chart, as these
are all DOM nodes."

On Mon, Mar 18, 2013 at 4:16 AM, Nuwan Bandara notifications@github.comwrote:

Hi,

Any plans on making them interactive. Right now, you don't have tooltips
etc for mouse pointers yeah ?

Regards,
/Nuwan


Reply to this email directly or view it on GitHubhttps://github.com//issues/2
.

@patcito
Copy link

patcito commented Mar 18, 2013

It would be good though to have basic tooltips support like github does it on its network graph using canvas https://github.com/nnnick/Chart.js/network

@nnnick
Copy link
Member

nnnick commented Mar 18, 2013

I haven't planned to add interactivity to charts at this stage. The chart is a single canvas DOM node, which is similar in characteristics to an image, but with a lighter footprint.

Canvas graphics sacrifice interactivity to raw speed. It's really up to you what is more important for your particular use case. There are a number of SVG based libraries for providing interactive graphs, including gRaphael, or other libraries built off d3.js.

@nnnick nnnick closed this as completed Mar 18, 2013
@dsotirescu
Copy link

It is relatively easy to add interactivity: keep a list of chart elements(type, coordinates)+data associated with them, add one method getElementAtMouseCoordinates(x, y). For each type of chart element you need to be able to intersect the mouse coordinate with the element's geometry. Quite easy for bars, a bit more work for pie slices, etc.

This will not sacrifice speed at all.

@dsotirescu
Copy link

By the way, your charts look gorgeous!

How difficult is it to add new chart types, for example a heat/tree map?

@liuxiachanghong
Copy link

tooltip on mouseover would be great, don't know how implement this though. I like your chart and looking forward to it.

@kazzkiq kazzkiq mentioned this issue Mar 19, 2013
krampstudio pushed a commit to krampstudio/Chart.js that referenced this issue Apr 5, 2013
serhii-yakymuk pushed a commit to serhii-yakymuk/Chart.js that referenced this issue Apr 3, 2018
Prashoon123 added a commit to Prashoon123/Chart.js that referenced this issue Oct 12, 2021
igorlukanin added a commit to igorlukanin/Chart.js that referenced this issue Oct 27, 2022
etimberg pushed a commit that referenced this issue Nov 11, 2022
…10816)

* Update docs

* Minor fixes

* Replace screenshots with live demos

* Replace the last screenshot with a live demo

* Bring back images

* Bring back images #2

* Remove unnecessary files

* Apply suggestions from code review

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>

* Very last tiny fixes

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
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

6 participants