Frederick Posted May 8 Share Posted May 8 When the TUniBar3dSeries (or TUniLineSeries) control has no data, an artifact is still displayed in the chart. How do I hide it? -- Frederick (UniGUI Complete - Professional Edition 1.95.0.1577) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8 Share Posted May 8 37 minutes ago, Frederick said: Hello, Try this trick as a workaround for now: function chart.redraw(sender, eOpts) { var chart = sender; var store = chart.getSeries()[0].getStore().getDataSource(); if (chart && store && store.getAt(0).get('LL') == '' && store.getCount() == 1) { chart.getSeries()[0].setHidden(true) } else { chart.getSeries()[0].setHidden(false) } } Quote Link to comment Share on other sites More sharing options...
Frederick Posted May 8 Author Share Posted May 8 Thank you. That did the trick! Quote Link to comment Share on other sites More sharing options...
Frederick Posted May 8 Author Share Posted May 8 Sherzod, How do I get the above code to work for the TUniLineSeries control? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8 Share Posted May 8 Try above solution. Quote Link to comment Share on other sites More sharing options...
Frederick Posted May 8 Author Share Posted May 8 I did that but in the TUniLineSeries control, the artifact still shows. There are 3 TUniLineSeries controls in the TUniChart that I have. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8 Share Posted May 8 Ok, I will check. Quote Link to comment Share on other sites More sharing options...
Frederick Posted May 8 Author Share Posted May 8 Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 8 Share Posted May 8 2 hours ago, Frederick said: There are 3 TUniLineSeries controls in the TUniChart that I have. Try this: function chart.redraw(sender, eOpts) { var chart = sender; var store = chart.getStore().getDataSource(); chart.getSeries().forEach(function(s) { if (chart && store && store.getAt(0).get('LL') == '' && store.getCount() == 1) { s.setHidden(true) } else { s.setHidden(false) } }) } Quote Link to comment Share on other sites More sharing options...
Frederick Posted May 8 Author Share Posted May 8 Thank you. This works. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.