I have a column chart with series values of 0, 1,2,3,4.
Rather than display the numbers, I would like to decode the numbers to a string value, e.g. instead of 1 as a label display something like 'low', instead of 2 display 'medium' etc. I have tried to get this to work with templates but have been unsuccessful.
something like
series: [{
type: "column",
aggregate: "avg",
field: 'value',
labels: {
template: "#if(value == 4) { # ${'exceed'} # } else { # ${value} #} #"
}
}],
The chart ignores the template and just displays the numbers 1,2 etc.
Is it possible to do what I want to do.
Rather than display the numbers, I would like to decode the numbers to a string value, e.g. instead of 1 as a label display something like 'low', instead of 2 display 'medium' etc. I have tried to get this to work with templates but have been unsuccessful.
something like
series: [{
type: "column",
aggregate: "avg",
field: 'value',
labels: {
template: "#if(value == 4) { # ${'exceed'} # } else { # ${value} #} #"
}
}],
The chart ignores the template and just displays the numbers 1,2 etc.
Is it possible to do what I want to do.