Git Product home page Git Product logo

highcharts-downsample's People

Contributors

sveinn-steinarsson avatar viesti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

highcharts-downsample's Issues

Using Point.update doesn't reprocess the data

I need to be able to use navigator and custom buttons to zoom into data.

I noticed threshold setting is applied for entire data set length, so while zoomed I need to calculate desirable threshold points count... And hook into setExtremes event to update series objects.

But it seems when doing Point update and redrawing the chart, new threshold value doesn't apply? I perhaps need to resort into removing and inserting new series' to chart...

var calcZoomedDownsampleThreshold = function(dataMin, dataMax, min, max) {
    var verticalPixels = window.innerWidth - 120;
    if ( ! _.isUndefined(dataMin) && ! _.isUndefined(dataMax) && ! _.isUndefined(min) && ! _.isUndefined(max) ) {
        var dataSpanSeconds = Math.floor((dataMax - dataMin) / 1000),
            zoomSpanSeconds = Math.floor((max - min) / 1000);
        console.log(Math.round(verticalPixels * dataSpanSeconds / zoomSpanSeconds));
        return Math.round(verticalPixels * dataSpanSeconds / zoomSpanSeconds);
    } else {
        return verticalPixels;
    }
};

xAxis: {
    type: 'datetime',
    events: {
        setExtremes: function (e) {
            chart.series[0].update({ downsample: { threshold: calcZoomedDownsampleThreshold(this.dataMin, this.dataMax, e.min, e.max) } }, false);
            chart.series[1].update({ downsample: { threshold: calcZoomedDownsampleThreshold(this.dataMin, this.dataMax, e.min, e.max) } }, false);
            chart.redraw();
        }
    }
},

Downsampling with Dynamic X Interval

Hello Sveinn,

First of all, thanks for sharing your work on LTTB algorithm. It is exactly what I am looking for to plot large data size in Microsoft Chart Component. Here is the link to my implementation in GitHub MSChartExtension/DownSampling.cs.

On top of that, I made some further improvement to address the limitation of your original LTTB algorithm to take into consideration with data with non fixed X. I wrote the description of the changes here: Implementation of Downsampling Algorithm in MSChart Extension

I would like to seek your kindness to review and comment on my work.
I am appreciate if my work is up to standard to be listed in your list of LTTB adaptation.

Should you have any questions, you can also contact me at [email protected].
Hope to hear from you soon.

Regards,
Code Artist

Downsampling doesn't preserve null values

First off, thanks a lot for this plugin and your work on downsampling.
I've used your plugin extensively and just recently experienced a issue with it:
When downsampling discrete time series (series with null values) the gaps sometimes get sampled out. The desired functionality would be for null values to go untouched so gaps in the series are displayed correctly.

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.