Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dynamically set probe data to charts(pie chart) #30

Open
aaswan opened this issue Aug 27, 2015 · 2 comments
Open

How to dynamically set probe data to charts(pie chart) #30

aaswan opened this issue Aug 27, 2015 · 2 comments

Comments

@aaswan
Copy link

aaswan commented Aug 27, 2015

Here is what I have tried till now:
I have connected to my localhost server using the Inspect probe
I checked that I am getting the updated values for my probe using the alert(monitor.get('value')) in the JS onInit box. When I load the PieChart I can see my updated values in the alert.
But I don't know how to bind this data to Data Series?

@aaswan aaswan changed the title How to dynamically set probe data to charts(pe chart) How to dynamically set probe data to charts(pie chart) Aug 27, 2015
@lorenwest
Copy link
Owner

It sounds like you're really close. Examine how the default data gets into the chart, and change that to provide data based on your probe. This may require some understanding of the underlying graphics system.

@begeeben
Copy link

begeeben commented Sep 7, 2016

You can put something similar to this in the on init textarea. I use it in the Gauge component. Perhaps this is not the best solution but it does the job:

setInterval(function() {
    var process = monitor.toProbeJSON();
    view.chart.series[0].addPoint(100*process.freemem/process.totalmem, true, true);
}, 1000);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants