Page 1 of 1

Unable to display ColorBand

Posted: Mon Oct 03, 2022 10:57 am
by 16078511
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!

Re: Unable to display ColorBand

Posted: Tue Oct 04, 2022 8:59 am
by Christopher
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 7948 times
Does this code work correctly for you?

Re: Unable to display ColorBand

Posted: Wed Oct 05, 2022 9:29 am
by 16078511
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.

Re: Unable to display ColorBand

Posted: Thu Oct 06, 2022 4:14 pm
by Pep
Hello,
I'm just checking what could be the cause of this problem. Will back to you with a solution asap.
Thanks

Re: Unable to display ColorBand

Posted: Mon Oct 10, 2022 10:19 am
by Pep
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

Re: Unable to display ColorBand

Posted: Wed Oct 12, 2022 2:46 pm
by 16078511
Thank you, the update solved the problem.