Unable to display ColorBand

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
csdev
Newbie
Newbie
Posts: 3
Joined: Wed Jun 15, 2016 12:00 am

Unable to display ColorBand

Post by csdev » Mon Oct 03, 2022 10:57 am

Hi,

I'm using TeeChart for Xamarin.Forms to create charts with a line plot and a reference area behind that line, using the TeeChart ColorBand. Recently I updated the version of TeeChart from 4.2018.5.16 to 4.2022.1.20. However, since the update, the ColorBand is no longer displayed, even though no other changes have been made to the code.

I tried to reproduce the issue using Steemas XamControls sample app from GitHub (https://github.com/Steema/TeeChart-NET- ... amControls). I added a ColorBand to the LineChart adding the following code in LineChart.cs. After updating the TeeChart version from 4.2020.5.28 to 4.2022.1.20, the ColorBand is no longer displayed in the line chart.

Code: Select all

LineChart(ChartView BaseChart) 
{
...
ColorBand colorBand = new ColorBand(BaseChart.Chart);
colorBand.Axis = BaseChart.Chart.Axes.Left;
colorBand.Color = Color.Red;
colorBand.Start = 200;
colorBand.End = 210;
...
}
Do you know if there are any known issues with the ColorBand in the new TeeChart version(s)? Is there anything that needs to be changed to make it work again? Thank you in advance!

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Unable to display ColorBand

Post by Christopher » Tue Oct 04, 2022 8:59 am

Hello,
csdev wrote:
Mon Oct 03, 2022 10:57 am
Do you know if there are any known issues with the ColorBand in the new TeeChart version(s)? Is there anything that needs to be changed to make it work again? Thank you in advance!
Using the latest NuGet in a .NET 6.0 WinForm app, the following code:

Code: Select all

    public Form1()
    {
      InitializeComponent();
      InitializeChart();
    }

    private void InitializeChart()
    {
      tChart1.Series.Add(typeof(Bar)).FillSampleValues();

      _ = new ColorBand(tChart1.Chart)
      {
        Axis = tChart1.Axes.Bottom,
        Start = 3,
        End = 5,
        Color = Color.RebeccaPurple
      };

      tChart1.Header.Text += $" version {Utils.Version}";

    }
  }
Renders correctly:
Screenshot from 2022-10-04 10-56-41.png
Screenshot from 2022-10-04 10-56-41.png (30.45 KiB) Viewed 3692 times
Does this code work correctly for you?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

csdev
Newbie
Newbie
Posts: 3
Joined: Wed Jun 15, 2016 12:00 am

Re: Unable to display ColorBand

Post by csdev » Wed Oct 05, 2022 9:29 am

Hi,

Thank you for the reply. It looks like you're using a different app and TeeChart package in your example. For me, the issue occurs in a .NET Standard 2.0 Xamarin.Forms app (on all three platforms) in combination with the Steema.TeeChart.NET.Xamarin.Forms NuGet package.

Could you try if it works properly with this as well? Thank you in advance.

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

Re: Unable to display ColorBand

Post by Pep » Thu Oct 06, 2022 4:14 pm

Hello,
I'm just checking what could be the cause of this problem. Will back to you with a solution asap.
Thanks

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

Re: Unable to display ColorBand

Post by Pep » Mon Oct 10, 2022 10:19 am

Helo,

you were correct. We've been able to reproduce the problem here.
We've already added a fix for this problem and just have published a new nuget package version 4.2022.10.10.
Could you please update your TeeChart NET for Xamarin.Forms version and check if the problem has been fixed for you?

Thanks

csdev
Newbie
Newbie
Posts: 3
Joined: Wed Jun 15, 2016 12:00 am

Re: Unable to display ColorBand

Post by csdev » Wed Oct 12, 2022 2:46 pm

Thank you, the update solved the problem.

Post Reply