origami.js icon indicating copy to clipboard operation
origami.js copied to clipboard

[lineChart] Adding tooltip support

Open raphamorim opened this issue 9 years ago • 6 comments

origami(canvas).chartLine({
    tooltip: true
    labels: ["January", "February", "March", "April", "May", "June", "July"],
    fill: true,
    datasets: [
      {
        data: [1, 9, 8, 71, 56, 30, 60],
        line: "2px solid pink",
      }]
})

screen shot 2016-10-26 at 16 41 57

raphamorim avatar Oct 26 '16 18:10 raphamorim

@raphamorim can you please guide how to proceed with the issue ?

goelrohan6 avatar Oct 27 '16 06:10 goelrohan6

Hi @goelrohan6 the goal is display a tooltip when the user put mouse over a point in the chart. This tooltip show the current data

raphamorim avatar Oct 27 '16 11:10 raphamorim

Hey @raphamorim I'd like to work on this. Where and how do I get started?

kolharsam avatar Oct 01 '17 21:10 kolharsam

Nice @Kolhar730 The idea is for every dataset.length show ...labels

So if we have: [0,1,3,4] as dataset. when exist ["first", "second"] as labels, 0 and 1 should be labeled

raphamorim avatar Oct 02 '17 05:10 raphamorim

@raphamorim thanks for the response. I'd want to get familiar with usage of OrigamiJS and also with the Canvas API. Could you give me a few days to get myself familiar with these.

I'm only a beginner, so I'd appreciate any help that comes from your side.

How should I be tackling these problems?

kolharsam avatar Oct 02 '17 05:10 kolharsam

No problem at all @Kolhar730, take your time.

I highly recommend you to look: https://github.com/raphamorim/origami.js/blob/master/src/charts/line.js

All line graph logic is there, any other thing you can ask. No problem at all, I'm be happy to help :octocat:

raphamorim avatar Oct 03 '17 04:10 raphamorim