Blank space issue for Candle Sticks Graph
Blank space issue for Candle Sticks Graph
while drawing Candle Stick Graph in Teechart.Net. When datavalue is not present for particular date it shows blank space (e.g.for Saturday, Sunday and Holiday.). previously when we were using Ocx version the candlestick graph was continuous without any blank space
Kindly see the attached file
Kindly see the attached file
- Attachments
-
- blankSpace.JPG (22.79 KiB) Viewed 24889 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Blank space issue for Candle Sticks Graph
There is an example in the Feature Demo under:Quant wrote:while drawing Candle Stick Graph in Teechart.Net. When datavalue is not present for particular date it shows blank space (e.g.for Saturday, Sunday and Holiday.). previously when we were using Ocx version the candlestick graph was continuous without any blank space
Kindly see the attached file
%Program Files%\Steema Software\Steema TeeChart for .NET 201X 4.1.201X.XXXXX\Examples\DemoProject\bin\ExecutableDemo\TeeChartNetExamples.exe
Go to the "All Features tab" and then
Welcome !\Chart styles\Financial\Candle (OHLC)\Axis Labels no Weekends
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 |
Re: Blank space issue for Candle Sticks Graph
Thank you for your prompt response. I already gone through that example.
But that workaround of labels will not work for me.
But that workaround of labels will not work for me.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Blank space issue for Candle Sticks Graph
Can you please send us the code that worked correctly for you in the OCX version?Quant wrote:Thank you for your prompt response. I already gone through that example.
But that workaround of labels will not work for me.
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 |
Re: Blank space issue for Candle Sticks Graph
Code: Select all
TChartMain.Series(0).asCandle.AddCandle(dtTemp.ToOADate(), OpenValue, HighValue, LowValue, CloseValue, dtTemp.Date.ToString(), (uint)TeeChart.EConstants.clTeeColor);
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Blank space issue for Candle Sticks Graph
Hello,
In TeeChart AX there is a property called "RemoveGaps":
This property is not present in TeeChart .NET, so I have added this property as a feature request with id=1147. In the meantime, the only option is to use the technique I have described, I'm afraid.
In TeeChart AX there is a property called "RemoveGaps":
This property is not present in TeeChart .NET, so I have added this property as a feature request with id=1147. In the meantime, the only option is to use the technique I have described, I'm afraid.
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 |
Re: Blank space issue for Candle Sticks Graph
Hi Christopher,
We need the same property on urgent basis, since we can not use given workaround for our project. Using integer value in date field makes us compromise most of the user requirements. It also changes our most of the source code which is based on the ActiveX Version of TeeChart.
Please let us know when we can get this functionality.
We need the same property on urgent basis, since we can not use given workaround for our project. Using integer value in date field makes us compromise most of the user requirements. It also changes our most of the source code which is based on the ActiveX Version of TeeChart.
Please let us know when we can get this functionality.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Blank space issue for Candle Sticks Graph
This property will be considered for inclusion into the next maintenance release, due out at the middle of next month.Quant wrote:Please let us know when we can get this functionality.
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 |
Re: Blank space issue for Candle Sticks Graph
We have downloaded the latest release of .Net TeeChart, but we haven't found the resolution for this Blank Space Issue.This property will be considered for inclusion into the next maintenance release, due out at the middle of next month.
Please let us know where we can find the same.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Blank space issue for Candle Sticks Graph
In the latest release notes we have:Quant wrote:We have downloaded the latest release of .Net TeeChart, but we haven't found the resolution for this Blank Space Issue.
Please let us know where we can find the same.
This property can be used like this:
Code: Select all
Candle series1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
series1 = new Candle(tChart1.Chart);
Random r = new Random();
double tmpOpen;
double tmpClose;
int count = 0;
DateTime dt = DateTime.Today;
TimeSpan ts = TimeSpan.FromDays(1);
for (int t = 0; t < 13; t++)
{
tmpOpen = r.Next(100);
tmpClose = tmpOpen - r.Next(100);
if (dt.DayOfWeek != DayOfWeek.Saturday & dt.DayOfWeek !=
DayOfWeek.Sunday)
{
++count;
series1.Add(dt, tmpOpen, tmpOpen + r.Next(50),
tmpClose - r.Next(50), tmpClose);
}
dt += ts;
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
series1.RemoveGaps = checkBox1.Checked;
}
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 |
Re: Blank space issue for Candle Sticks Graph
Code: Select all
Candle newSeries = new Candle();
newSeries.VertAxis = VerticalAxis.Right;
newSeries.UpCloseColor = Color.White;
newSeries.DownCloseColor = Color.Black;
newSeries.CandleWidth = 2;
newSeries.TreatNulls = TreatNullsStyle.Skip;
newSeries.Marks.Style = MarksStyles.Value;
newSeries.Marks.MultiLine = true;
newSeries.Title = "Title1";
for (int i = 0; i < chartObj.totalSampleValues; i++)
{
date = (DateTime)dataTable.Rows[i][0];
open = dataTable.Rows[i][1];
close = dataTable.Rows[i][2];
high = dataTable.Rows[i][3];
low = dataTable.Rows[i][4];
labels.Add(date.ToShortDateString());
closeValues.Add(close.ToString());
//newSeries.Add(i, open, high, low, close);
newSeries.Add(date, open, high, low, close);
}
//newSeries.Labels = labels;
newSeries.RemoveGaps = true;
this.tChart1.Series.Add(newSeries);
newSeries = (Candle)tChart1.Series[0];
Error comes at "newSeries.RemoveGaps = true;" this line.
Note: While in sample project this feature works as expected.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Blank space issue for Candle Sticks Graph
Hello,
Without access to your data, I'm afraid I cannot reproduce your issue. Can you please modify the code snippet below so I can reproduce your issue here?
Without access to your data, I'm afraid I cannot reproduce your issue. Can you please modify the code snippet below so I can reproduce your issue here?
Code: Select all
Candle newSeries;
private void InitializeChart()
{
newSeries = new Candle();
newSeries.VertAxis = VerticalAxis.Right;
newSeries.UpCloseColor = Color.White;
newSeries.DownCloseColor = Color.Black;
newSeries.CandleWidth = 2;
newSeries.TreatNulls = TreatNullsStyle.Skip;
newSeries.Marks.Style = MarksStyles.Value;
newSeries.Marks.MultiLine = true;
newSeries.Title = "Title1";
DateTime date = DateTime.Today;
double open, close, high, low;
Random rnd = new Random();
for (int i = 0; i < 20; i++)
{
date = date.AddDays(1);
open = rnd.NextDouble();
high = open + rnd.NextDouble();
close = high - rnd.NextDouble();
low = close - rnd.NextDouble();
//labels.Add(date.ToShortDateString());
//closeValues.Add(close.ToString());
//newSeries.Add(i, open, high, low, close);
if (date.DayOfWeek != DayOfWeek.Saturday & date.DayOfWeek !=
DayOfWeek.Sunday)
{
newSeries.Add(date, open, high, low, close);
}
}
//newSeries.Labels = labels;
newSeries.RemoveGaps = true;
this.tChart1.Series.Add(newSeries);
newSeries = (Candle)tChart1.Series[0];
tChart1.Axes.Bottom.Labels.Angle = 90;
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
newSeries.RemoveGaps = !newSeries.RemoveGaps;
}
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 |
Re: Blank space issue for Candle Sticks Graph
We are using a DataTable with Following FieldsWithout access to your data, I'm afraid I cannot reproduce your issue. Can you please modify the code snippet below so I can reproduce your issue here?
1] Date
2] Open
3] Close
4] High
5] Low
Re: Blank space issue for Candle Sticks Graph
Our problem still continues with series.RemoveGaps property. It shows blank screen when set to "true".
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Blank space issue for Candle Sticks Graph
As per the instructions for posting in this forum, which you can read here, can you please provide a Short, Self Contained, Correct (Compilable), Example (explanation here) with which we can reproduce your problem.Quant wrote:Our problem still continues with series.RemoveGaps property. It shows blank screen when set to "true".
Thank 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 |