Changing Indicator Styles Using the Indicator API (versions 6.7.1+)
To learn more about changing the indicator styles on versions prior to 6.7.1, please check out this community article:
Indicator styles are modified by an API (v6.6.1+) and the reference for making such changes can be found here, within the Javascript API documentation on our developer site:
Below are examples of which aspects of the indicators can be manipulated by the API:
As you can see, each indicator has a variety of sizes that it will automatically switch to depending on the size of the widget boundaries in the dashboard, ranging from "big" to "small" (the main types) and "ticker".
Using JavaScript, an object of these configurations can be passed to the setOptions method on the indicatorInstance object within the widget "initialized" lifecycle hook:
-
Hi Jason,
I'm trying to move beyond the "Big" size into a giant/fullscreen size.
Is there any way to increase the canvas size at the same time?
I'm able to get giant text via:
var options = {
value: {
fontSizes: {
big: '400pt'
},
},
};
w.indicatorInstance.setOptions('numericSimple', options);
});But, it's big text seen through a tiny window and increasing the canvas size seems to just stretch the visible pixels rather than increasing the size of the window.
-
Hi Brain,
I checked for a programmatic way to apply the canvas dimension along with the other settings, but this doesn't appear to exist as an externally configurable option at the moment.
Currently, the mechanics of setting the canvas dimensions are tightly coupled with the implementation of the render function.
All the best,
Jason
Please sign in to leave a comment.
Comments
3 comments