Sir
I'm using UniGUI Complete Professional V1.90.0.1560 in RAD C++ Builder 10.4 Update 2.
I'm getting an Ajax error when trying to assign a new title to a stream of a UniChart.
I have the following procedure:
void __fastcall TMainForm::SetNewTitle(TUniChart *ThisChart, int StreamNo)
{
UnicodeString NewTitle;
NewTitle = "New Title";
if (StreamNo==0)
ThisChart->JSInterface->JSCall((UnicodeString)L"chart.series[0].setTitle",ARRAYOFCONST((NewTitle)));
if (StreamNo==1)
ThisChart->JSInterface->JSCall((UnicodeString)L"chart.series[1].setTitle",ARRAYOFCONST((NewTitle)));
if (StreamNo==2)
ThisChart->JSInterface->JSCall((UnicodeString)L"chart.series[2].setTitle",ARRAYOFCONST((NewTitle)));
}
As long as the UniChart has 3 UniLineSeries, everything works fine when I call
SetNewTitle(UniChart,0);
SetNewTitle(UniChart,1);
SetNewTitle(UniChart,2);
But as soon as I use 3 UniBarSeries, UniAreaSeries or any other series on the UniChart, then calling SetNewTitle for all 3 series gives an Ajax error:
"Cannot read properties of undefined (reading 'SetTitle')"
The easiest fix would be to allow us to set the Title property for each Series in the SeriesList:
UniChart->SeriesList->Series[0]->Title = "New Title";
UniChart->SeriesList->Series[1]->Title = "New Title";
UniChart->SeriesList->Series[2]->Title = "New Title";
Then we don't even have to use the JSCall which is not working for UniBarSeries, UniAreaSeries and other series in C++Builder.
By the way, I have to tell you that the uniGUI framework is most amazing. I only have the greatest respect for your work, you are a genius!!
If only we could fix this bug then I will be a vey happy customer…