Left margin AreaLineChart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Bank Van Breda
Newbie
Newbie
Posts: 7
Joined: Thu Apr 15, 2021 12:00 am

Left margin AreaLineChart

Post by Bank Van Breda » Tue May 18, 2021 10:19 am

We use the AreaLineChart in our Xamarin Forms application.
But no matter what we set the WidthRequest to, there is always more left margin white space than on the right side.
We set the control to Center.

Cfr screenshot.

How can we get equal margins?
Attachments
AreaLineChart.png
AreaLineChart.png (294.4 KiB) Viewed 22992 times

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Left margin AreaLineChart

Post by Pep » Fri May 21, 2021 8:43 am

Hello,

could you please share the code that you're using to change the chart aspect and data points to populate ?
I can't reproduce the problem here by using this area example.

Bank Van Breda
Newbie
Newbie
Posts: 7
Joined: Thu Apr 15, 2021 12:00 am

Re: Left margin AreaLineChart

Post by Bank Van Breda » Fri May 21, 2021 10:30 am

I will try to recreate a sample.

Bank Van Breda
Newbie
Newbie
Posts: 7
Joined: Thu Apr 15, 2021 12:00 am

Re: Left margin AreaLineChart

Post by Bank Van Breda » Fri May 21, 2021 1:32 pm

Seems our screen design is doing something, because the demo app I created to share does indeed not have this problem.
In other words, I need to digg deeper in our production app.

Sorry for the inconvenience and time, thanks for the tip.

Bank Van Breda
Newbie
Newbie
Posts: 7
Joined: Thu Apr 15, 2021 12:00 am

Re: Left margin AreaLineChart

Post by Bank Van Breda » Fri May 21, 2021 1:51 pm

Ha, found the difference!
When toggling the chart with IsVisible, it will be smaller!
Last edited by Bank Van Breda on Fri May 21, 2021 1:58 pm, edited 1 time in total.

Bank Van Breda
Newbie
Newbie
Posts: 7
Joined: Thu Apr 15, 2021 12:00 am

Re: Left margin AreaLineChart

Post by Bank Van Breda » Fri May 21, 2021 1:57 pm

So the problem is with graphs being rendered invisible and shown later...
Here I load the same graph twice on the page, the first one is just like your sample the second one has a bool bound to IsVisible and will become visible with the button click.
This will render it smaller! Cfr screenshots.

Do you still need extra info on code? I can supply the example if needed.
Attachments
Screenshot 2021-05-21 at 15.54.31.png
Screenshot 2021-05-21 at 15.54.31.png (92.05 KiB) Viewed 22950 times
Screenshot 2021-05-21 at 15.54.28.png
Screenshot 2021-05-21 at 15.54.28.png (76.73 KiB) Viewed 22950 times

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Left margin AreaLineChart

Post by Pep » Fri May 21, 2021 2:07 pm

Hello,
ok, it's very strange problem. Let me check here and back to you. If I need code you use will ask.
Thanks.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Left margin AreaLineChart

Post by Pep » Sat May 22, 2021 5:14 pm

Hello,
I've just checked here setting the Chart view visible and invisible by using a simple IsVisible code :

Code: Select all

        private void B_Clicked(object sender, EventArgs e)
        {
            AreaLineChart.IsVisible = !AreaLineChart.IsVisible;
        }
but all seems to work fine anyway.
Could you please send me the code that you're using in order to make it invisible at first ?
Thanks

Bank Van Breda
Newbie
Newbie
Posts: 7
Joined: Thu Apr 15, 2021 12:00 am

Re: Left margin AreaLineChart

Post by Bank Van Breda » Tue May 25, 2021 7:51 am

I added the sample here : https://github.com/Depechie/Charting
It does not contain our license file of course :)

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Re: Left margin AreaLineChart

Post by Pep » Fri May 28, 2021 5:05 am

Hello,
yes, you're correct, I'm able to reproduce the problem here.
For the moment still not found what's the cause of this. We will review more carefully in order to find a solution.
In meantime, would be an option to you to set invisible via code instead of doing it via binding ?

Thanks

Bank Van Breda
Newbie
Newbie
Posts: 7
Joined: Thu Apr 15, 2021 12:00 am

Re: Left margin AreaLineChart

Post by Bank Van Breda » Fri May 28, 2021 12:33 pm

Not in our actual production app. Everything is abstracted away from the View and handled in the ViewModel...

Post Reply