Legend not showing up?


#1

Hi,

I’m using a chart to plot live data and so when I first go to the chart screen, there isn’t any data. Should the legend still show up? It doesn’t seem to be (though I am changing where it shows up.) Is there any way to force it to draw even if the plots are empty?

Thanks!


#2

Hi Abcgz,

When you say that your chart has no data, do you mean that you have series on your chart, but those series have zero data points on them? Or do you mean that you have zero series on your chart?

I noticed you have a duplicate forum post, which I deleted to keep the forum clear of duplicates. I hope you don’t mind.

Thanks,

Jan


#3

Hi Jan,

Correct, I have several series but they all start out empty. Additionally, as data begins to show up, the legend remains missing.

Sorry for the double post; I actually replied to it with another question and thought that might prevent it from getting a response so I opened another one. 

Thanks,

Scott


#4

Is the issue that you just don’t have a legend at all? You should be able to show the legend by simply doing:

myChart.legend.hidden = NO;

Thanks,
Jan


#5

Hi Jan,

I have that line of code. On the summary screen, the same code runs and since there’s data, the legend shows up correctly.

Thanks,
Scott


#6

Hi Jan,

Any other ideas?

Thanks,

Scott


#7

Hi Scott,

So, to clarify, your issue is that if you have no data to begin with, you then have no legend, then, when you go onto load data on your chart, your legend remains missing?

Would it be possible for you to either upload or email us (info@shinobicontrols.com) a cut down project demonstrating this issue. I will then be able to pick it up and take look first hand at the problem - hopefully finding you a solution :grin:!

Jan