Page 1 of 1

While Converting series to Kagi it compresses

Posted: Tue Mar 29, 2016 5:29 am
by 16071129
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 10956 times

Re: While Converting series to Kagi it compresses

Posted: Tue Mar 29, 2016 3:47 pm
by Christopher
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);
    }

Re: While Converting series to Kagi it compresses

Posted: Wed Mar 30, 2016 3:22 am
by 16071129
and what about compression irrespective of X Axis. i.e. value of 2015 is shown at 2007.

Re: While Converting series to Kagi it compresses

Posted: Wed Mar 30, 2016 8:22 am
by Christopher
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?