allenchow Posted December 14, 2016 Share Posted December 14, 2016 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 ! Link to comment Share on other sites More sharing options...
allenchow Posted December 14, 2016 Author Share Posted December 14, 2016 Is it a bug ? Link to comment Share on other sites More sharing options...
Sherzod Posted December 14, 2016 Share Posted December 14, 2016 Hi, Сan you make a small test case for this, if will not be difficult for you ?! Best regards. Link to comment Share on other sites More sharing options...
allenchow Posted December 14, 2016 Author Share Posted December 14, 2016 actually you can check the piechart demo, after click clear button, all 'sticks' are still remain... Link to comment Share on other sites More sharing options...
allenchow Posted December 15, 2016 Author Share Posted December 15, 2016 ANY HINT ? Link to comment Share on other sites More sharing options...
Sherzod Posted December 15, 2016 Share Posted December 15, 2016 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. Link to comment Share on other sites More sharing options...
allenchow Posted December 16, 2016 Author Share Posted December 16, 2016 How about if the chart is not in the mainform? Thanks Link to comment Share on other sites More sharing options...
Sherzod Posted December 16, 2016 Share Posted December 16, 2016 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. Link to comment Share on other sites More sharing options...
allenchow Posted December 16, 2016 Author Share Posted December 16, 2016 Not work ....I've attached a sample ChartTest.rar Link to comment Share on other sites More sharing options...
Sherzod Posted December 16, 2016 Share Posted December 16, 2016 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. Link to comment Share on other sites More sharing options...
allenchow Posted December 16, 2016 Author Share Posted December 16, 2016 Finally it works. Thanks a lot !! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now