When I create a chart I can use ‘#SuccessColor#’ to set a property value, for example the color of the bar.
But when I create the legend I can’t use this variable anymore to set the color of the marker in the legend.
Is there a way to use this variable ‘#SuccessColor#’ in a legend?
See my code example below.
Thanks in advance.
[code]var barChart = new dhtmlXChart({
view: ‘stackedBar’,
container: ‘chart_backup_reliability’,
value: ‘#Success#’,
color: ‘#SuccessColor#’,
width: 10,
xAxis: {
title: ‘month’,
template: ‘#month#’
},
yAxis: {
title: ‘Amount’,
start: 0,
end: 100,
step: 1
},
legend:{
width: 100,
align: “center”,
valign: “bottom”,
values: [{text: ‘Success’, color: ‘#SuccessColor#’}, {text: ‘Fail’, color: ‘#8C7D94’} , {text: ‘Fail (manual)’, color: ‘#424242’}, {text: ‘NotChecked’, color: ‘#6A626F’} ],
layout: ‘x’,
marker:{
type: “point”,
width: 5,
height: 15
},
}
});
barChart.load(“url”, “xml”);
[/code]