While Converting series to Kagi it compresses

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Quant
Advanced
Posts: 142
Joined: Tue Dec 30, 2014 12:00 am

While Converting series to Kagi it compresses

Post by Quant » Tue Mar 29, 2016 5:29 am

1) when I convert candle series to Kagi it compresses to half of timeline. can you give solution to make it as per datetime bottom axis.
2) also when I revert series type to candle with Series.ChangeType it doesn't clear Kagi series.
KagiChart.JPG
KagiChart.JPG (73.39 KiB) Viewed 9348 times

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

Re: While Converting series to Kagi it compresses

Post by Christopher » Tue Mar 29, 2016 3:47 pm

Hello,

The Kagi series is an unusual series type in the sense that it draws its own axes labels. This means that to convert from Candle to Kagi requires code similar to the following:

Code: Select all

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      tChart1.Series.Add(typeof(Candle)).FillSampleValues();
    }

    private void button4_Click(object sender, EventArgs e)
    {
      Series series = tChart1[0];
      Series.ChangeType(ref series, typeof(Kagi));
      tChart1.Clear();
      tChart1.Aspect.View3D = false;
      tChart1.Series.Add(series);
    }
and from Kagi to Candle:

Code: Select all

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      tChart1.Series.Add(typeof(Kagi)).FillSampleValues();
    }

    private void button4_Click(object sender, EventArgs e)
    {
      Series series = tChart1[0];
      Series.ChangeType(ref series, typeof(Candle));
      tChart1.Clear();
      tChart1.Aspect.View3D = false;
      tChart1.Series.Add(series);
    }
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

Quant
Advanced
Posts: 142
Joined: Tue Dec 30, 2014 12:00 am

Re: While Converting series to Kagi it compresses

Post by Quant » Wed Mar 30, 2016 3:22 am

and what about compression irrespective of X Axis. i.e. value of 2015 is shown at 2007.

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

Re: While Converting series to Kagi it compresses

Post by Christopher » Wed Mar 30, 2016 8:22 am

Quant wrote:and what about compression irrespective of X Axis. i.e. value of 2015 is shown at 2007.
In the two code examples I posted this effect is not seen. Would you please be so kind as to post a Minimal, Complete, and Verifiable example so I can reproduce the issue here?
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

Post Reply