How change legend values with param ??


#1

Hi , please can you tell me , how i can dynamicly change legend values name when i use load function ???

for example
i have
values:[
{text:“company A”,color:"#3399ff"},
{text:“company B”,color:"#66cc00", markerType:“item”}
]

Can i use val_count param and show in the legend name ?
same like this

values:[
{text:“company A(number=”+val_count+")",color:"#3399ff"},
{text:“company B”,color:"#66cc00", markerType:“item”}
]


#2

maybe something like this ???

values:function(){

  var val_count=5;
  var ret='{text:"company A(number="+val_count+")",color:"#3399ff"},
   {text:"company B",color:"#66cc00", markerType:"item"}'
  
  return  ret

}


#3

Hi
You can use “template” property for this
docs.dhtmlx.com/chart__legend.html