I'm wondering whether it's possible to target multiple series in the same rule using tokens. In essence, what I am aiming for is "if the value from series 1 is greater than the value in the same position in series 2, change some styles".
Zingchart config:
var config = {
// ...
'type': 'area',
'plot': {
'rules': [
{
'rule': '', // %v from series 1 > %v from series 2
'background-color': '#ccc'
}
]
},
'series': [
{
'text': 'Series 1',
'values': [36, 40, 38, 47, 49, 45, 48, 54, 58, 65, 74, 79, 85, 83, 79, 71, 61, 55]
},
{
'text': 'Series 2',
'values': [40, 40, 40, 50, 50, 50, 50, 60, 60, 80, 80, 80, 80, 80, 80, 80, 60, 60]
}
]
}
If that's not possible, is there another way to achieve the same outcome? I'm aiming to change the style of an individual point when the series 1 value is greater than the series 2 value.
selected-state
with a staticselection
array. This looks far more efficient. However, I'm wondering how I can use the above method to style the background-color of the plot area behind a single point on an area or line chart. It's not the marker itself I want to style, but according to the docs I can't definerules
directly onplot
. Example – Escarpment