(11-06-2020, 12:13 PM)matija Wrote: Something from code:
Code:datasets: [{
label: '# Years',
data: [2020, 2019, 2018],
The easiest way is to use TIWTemplateProcessorHTML with OnUnknownTag event.
In your template you replace "data: [2020, 2019, 2018]" with {$_MYDATA_$} for example and then in TIWTemplateProcessorHTML.OnUnknownTag event you do something like:
Code:
procedure TYourForm.IWTemplateProcessorHTML1UnknownTag(const AName: string; var VValue: string);
begin
if SameText(AName, '_MYDATA_') then
begin
VValue := 'data: [2020, 2019, 2018]'; //<-- you get the values from your db here
end;
end;Another way would be to use Custom Content Handlers.

