Jump to content

Change UniChart Series Title


brunotoira
 Share

Recommended Posts

Hi.

 

Try:

 

tested for TUniLineSeries

procedure TMainForm.UniButton1Click(Sender: TObject);
var
  //Series:
  legendIndx: Byte; 
  legendNewTitle: string;
  chartJSName: string;
begin  
  //Series: 
  legendIndx := 0;
  legendNewTitle := 'New Title';
  chartJSName := UniChart1.JSName;
  UniSession.AddJS('if ('+ chartJSName +'.items.items[0].legend.items['+ IntToStr(legendIndx) +']) {'+ chartJSName +'.items.items[0].legend.items['+ IntToStr(legendIndx) +'].series.setTitle("'+ legendNewTitle +'")};');
end;

Best regards

Link to comment
Share on other sites

  • 2 weeks later...

Another way is
 
  if WebMode then
        begin
          BSeries_P.Title:='Dolor de Cabeza.';
          BSeries_S.Title:='Dolor de Oidos.';
          BSeries_T.Title:='Fiebre Alta.';
        end;
 

post-482-0-35662900-1398360471_thumb.png

tested on version 0.95.0.1046

Link to comment
Share on other sites

 Share

×
×
  • Create New...