Jump to content

How To Hide The Artifact When The TUniBar3dSeries (or TUniLineSeries) Has No Data?


Frederick

Recommended Posts

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)

 

unibarchartnodata.png

Link to comment
Share on other sites

37 minutes ago, Frederick said:

unibarchartnodata.png

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)
    }
}

 

Link to comment
Share on other sites

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)
        }
    })
}

 

Link to comment
Share on other sites

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