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

Dynamic change of graph line dataset properties in custom.js afterGetDevices(){ #1179

Open
JRB202 opened this issue Feb 23, 2024 · 2 comments

Comments

@JRB202
Copy link

JRB202 commented Feb 23, 2024

Is it possible make dynamic change of graph line dataset properties in custom.js afterGetDevices()

I would like to change these dataset properties :
borderColor
borderDash
borderWidth
pointRadius

==> How to address already build graph v v_1 v_2 dataset ?

@lokonli
Copy link
Collaborator

lokonli commented Feb 27, 2024

I would expect you can call setBlock(). Something like:

   var key='my graph';
   myblock = blocks[key];
   myblock.datasets['v'].borderColor = 'green';
   Dashticz.setBlock(key, myblock);

@JRB202
Copy link
Author

JRB202 commented Feb 27, 2024

I am using custom reports then using this way does not seem to work :

var key='Autonomy-vs-Lines';
myblock = blocks[key];
myblock.custom['last12H'].datasets['v_1'].legend = 'My legend';
Dashticz.setBlock(key, myblock);

Where am I wrong ?

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

2 participants