R
R
Russland Russland2017-03-10 17:01:52
JavaScript
Russland Russland, 2017-03-10 17:01:52

A simple chart with "floating" points. What is the best way to implement?

You need to make a simple graph like here, on the second screen of pixelbin.com .
fd5008c07e.jpg
It is necessary that the points move smoothly up and down in the same way and react to the cursor within a certain radius. What is the easiest way to implement it? Are there ready-made solutions or is it easier to tinker yourself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Falseclock, 2017-03-10
@Falseclock

all this can be implemented through www.chartjs.org , you just have to do a little more
laziness to generate GIF, but I did the same in my CRM
Processing through

Chart.plugins.register({
  afterDatasetsDraw: function(chartInstance, easing) {
    var ctx = chartInstance.chart.ctx;
    chartInstance.data.datasets.forEach(function (dataset, i) {
      var meta = chartInstance.getDatasetMeta(i);
      if (!meta.hidden && dataset.type == 'line') {
        // здесь код того что вы хотите реализовать
      }
    });
  }
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question