Jump to content

Show/Hide markers in runtime UniLineSeries1.ShowMarkers


dima

Recommended Posts

Is it possible to Show/Hide markers of UniLineSeries in runtime ?

IMHO it works only if assigned in DesignTime in object Inspector or first time when Series initialized.

After Markers shown or hidden - I could not change that dynamically in runtime.

 

Thanks for advice,

Link to comment
Share on other sites

Hello,

3 hours ago, dima said:

do you have any resolution on the problem?

Okay. Try this approach:

1. InDesignTime ->

Series1 (TUniLineSeries) -> ShowMarkers = True

2. Usage, OnReady event, Button OnClick event for example ->

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  with UniChart1 do
  begin
    JSInterface.JSCall('chart.getSeries()['+ IntToStr(SeriesList.IndexOf(Series1)) +'].setShowMarkers', [False]); //OnClick event True/False
    if not IsLoading then
      JSInterface.JSCall('chart.redraw', []);
  end;
end;

 

Link to comment
Share on other sites

Hi Sherzod,

Spasibo Brat! 

I applied this code in an OnClick Event and added Form flag  FShowMarkers because Series1.ShowMarkers is not updated in runtime. But hopefully this is solved in production. 

...

FShowMarkers := not FShowMarkers;

JSInterface.JSCall('chart.getSeries()['+ IntToStr(SeriesList.IndexOf(Series1)) +'].setShowMarkers', [FShowMarkers]);

 

Appreciated,

 

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...