Jump to content

Recommended Posts

Posted

When I modify values of pieseries, I use clear method,

but the serieslabel (calloutline display outside) sticks were still there and will not clear by themselves.

 

Also I can't assign serieslabel.calloutline directly, no such property .

 

Please fixed . Thanks !

Posted

Hi,

 

For now can you try this approach ?!:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  Series1.Clear; // your TUniPieSeries
  // UniChart1 - your TUniChart
  UniSession.AddJS('Ext.defer(function(){'+ UniChart1.JSName +'.chart.store.loadData([]);'
                                          + UniChart1.JSName +'.chart.surface.removeAll();'
                                          + '}, 50)'
  );
end;
procedure TMainForm.UniFormReady(Sender: TObject);
begin
  // UniChart1 - your TUniChart
  UniSession.AddJS(UniChart1.JSName + '.chart.addListener("resize", function(){if (this.store.count() == 0) {this.surface.removeAll()}})');
end;

Best regards.

Posted

Hi,

 

How about if the chart is not in the mainform? Thanks

 

If you meant this code ?:

UniSession.AddJS(UniChart1.JSName + '.chart.addListener("resize", function(){if (this.store.count() == 0) {this.surface.removeAll()}})');

Then try the following code:

 

UniChart1 -> ClientEvents -> UniEvents -> Ext.chart.Chart [chart] -> chart.beforeInit fn:

function chart.beforeInit(sender, config)
{
    sender.addListener("resize", function() {
        if (this.store.count() == 0) {
            this.surface.removeAll()
        }
    });
}

Best regards.

Posted

Hi,

 

Ok

Then try this:

 

 UniSession.AddJS('Ext.defer(function(){'+ UniChart1.JSName +'.chart.store.loadData([]);'
                                                                + UniChart1.JSName +'.chart.surface.removeAll();'
                                                                + '}, 50)'
  ); 

 

 Correct -> UniSession.AddJS('Ext.defer(function(){'+ UniChart1.JSName +'.chart.store.loadData([]);'
                                                                + UniChart1.JSName +'.chart.surface.removeAll();'
                                                                + '}, 0)'
  );

 

Best regards.

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...