Code Monkey home page Code Monkey logo

Comments (5)

ckyycc avatar ckyycc commented on August 28, 2024

Are you using "Number" datasets (with labels)? Currently only "Point" datasets are supported.

from chartjs-plugin-responsive-downsample.

tomherold avatar tomherold commented on August 28, 2024

I am using number datasets. Any chance to update your plugin to support number sets?

from chartjs-plugin-responsive-downsample.

ckyycc avatar ckyycc commented on August 28, 2024

From my point of view, it's really hard to support number sets unless chart.js can do multiple labels.
Otherwise, we will run into following situation:

Let's say we have below data (with 2 datasets and the labels):

data: {
    labels: ["A", "B", "C", "D", "E", "F"],
    datasets: [
        { label: 'label1', data: [12, 19, 4, 5, 2, 3] },  
        { label: 'label2',  data: [11, 15, 1, 9, 3, 2] }
    ]
}

And, let's assume, after being downsampled,
dataset lable1 will become: data: [19, 5, 3],
dataset lable2 will become: data: [11, 1, 3].

Then, we do not know which labels need to use, ["B","D","F"] or ["A","C","E"] ?

@MPursche correct me if I am wrong.

from chartjs-plugin-responsive-downsample.

MPursche avatar MPursche commented on August 28, 2024

@ckyycc Yes, only "Point" datasets are currently supported and I don't think there is a straight-forward way to add support for number sets. The implemented algorithms downsample data by aggregation or by leaving out data points. This only makes sense when there is a numerical or time-based x-axis.

from chartjs-plugin-responsive-downsample.

kmlbgn avatar kmlbgn commented on August 28, 2024

I have a time-based x-axis, any tips on a way to go around this problem?

from chartjs-plugin-responsive-downsample.

Related Issues (7)

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.