Giter Club home page Giter Club logo

Comments (3)

samber avatar samber commented on May 30, 2024 1

I just added an example to documentation:

I tried to use chart.update({duration: 0}); but it didn't work. Use options.animation.duration = 0 instead.

var myChart = new Chart(ctx, {
    type: 'line',
    plugins: [ChartDatasourcePrometheusPlugin],
    options: {
        animation: {
            duration: 0,
        },
        plugins: {
            'datasource-prometheus': {
                prometheus: {
                    endpoint: "http://demo.robustperception.io:9090",
                },
                query: 'node_load1',
                timeRange: {
                    type: 'relative',

                    // from 10 minutes ago to now
                    start: -1 * 10 * 60 * 1000,
                    end: 0,
                    msUpdateInterval: 5000,
                },
            },
        },
    },
});

from chartjs-plugin-datasource-prometheus.

x-077 avatar x-077 commented on May 30, 2024

Hello @dalbani ,

it seems that it's possible to disable the animation with the following

image

It should be easy to implement

@samber , do you plan to add a functionality that "cumulate" data instead of "refreshing" the graph ? Let say I monitor memory/cpu, when initializing, the graph show the consuption for the last 10 minutes. Then, when refreshing, it will add the data to the graph, instead of refreshing the graph with the new data ? (I hope its clear ).

Thanks

from chartjs-plugin-datasource-prometheus.

samber avatar samber commented on May 30, 2024

Hi @matth-c3

The plugin supports relative time range (example: from -600 to 0), then you should be able to do that by yourself, with a simple refresh.

from chartjs-plugin-datasource-prometheus.

Related Issues (16)

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.