Page 1 of 1

TLineSeries not showing on TChart

Posted: Tue Aug 16, 2005 9:44 am
by 9342247
I have a problem with a TLineSeries not showing on my Chart. This particular series consists of several X-values incidentally all having the same Y-value, which also happens to be MaxYValue. TFastLineSeries with this data shows fine on my Chart, TLineSeries doesn't. I need to use TLineSeries in my actual code to enable TSeriesPointer.

The dfm-extract below reproduces the problem. If you uncheck Series3 and check Series1 no line shows on Y=100. However if you uncheck Series1 and check Series3, Series 3 shows fine.

Any clues how to fix this without turning off automatic axis-scaling?

Version is VCL TeeChart Pro v7.

Regards,

Christiaan ten Pas

object Chart1: TChart
Left = 40
Top = 16
Width = 400
Height = 250
Legend.CheckBoxes = True
Title.Text.Strings = ('TChart')
RightAxis.Visible = False
TopAxis.Visible = False
View3D = False
View3DWalls = False
TabOrder = 0
PrintMargins = (
15
19
15
19)
object Series1: TLineSeries
Marks.Callout.Brush.Color = clBlack
Marks.Visible = False
LinePen.Color = clRed
Pointer.InflateMargins = True
Pointer.Style = psRectangle
Pointer.Visible = False
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
Data = { 0005000000000000000000594000000000000059400000000000005940000000
00000059400000000000005940}
end
object Series2: TLineSeries
Marks.Callout.Brush.Color = clBlack
Marks.Visible = False
Pointer.InflateMargins = True
Pointer.Style = psRectangle
Pointer.Visible = False
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
Data = { 0005000000000000000000244000000000000034400000000000003E40000000
00000044400000000000005940}
end
object Series3: TFastLineSeries
Marks.Callout.Brush.Color = clBlack
Marks.Visible = False
LinePen.Color = clYellow
XValues.Name = 'X'
XValues.Order = loAscending
YValues.Name = 'Y'
YValues.Order = loNone
Data = { 0005000000000000000000594000000000000059400000000000005940000000
00000059400000000000005940}
end
end

Posted: Tue Aug 16, 2005 10:45 am
by narcis
Hi Christiaan,

Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Re: TLineSeries not showing on TChart

Posted: Tue Aug 16, 2005 11:04 am
by 9342247
Hi Narcis

>Could you please send us an example we can run "as-is" to reproduce the problem here?

Done.

Regards,

Christiaan

Posted: Tue Aug 16, 2005 11:11 am
by narcis
Hi Christiaan,

Thanks for the project but there seems to be an error in the zipped file as it can't be extracted. Also your second message doesn't contain any attached file. Could you please check that?

Thanks in advance.

Posted: Tue Aug 16, 2005 11:39 am
by 9342247
Hi narcis,

> Thanks for the project but there seems to be an error in the zipped file as it can't be extracted.
> Also your second message doesn't contain any attached file. Could you please check that?

The attachment is broken into 2 parts, i don't know for what reason. Newsreaders should be able to reassemble these part into the original attachment. However i could send it by mail if you prefer.

Regards,

Christiaan

Posted: Tue Aug 16, 2005 11:48 am
by narcis
Hi Christiaan,

Thanks for caring about that. It seems not to be working here with Outlook Express as newsreader. You can send the files to me.

Thanks in advance.

Posted: Tue Aug 16, 2005 3:12 pm
by narcis
Hi Christiaan,

I've received your project and been able to reproduce the problem you reported. You can solve it adding a slight offset to the left axis maximum value:

Code: Select all

Chart1.Axes.Left.MaximumOffset := 1;
This can be also set at design-time via the chart editor.

Re

Posted: Wed Aug 17, 2005 5:18 am
by 9342247
Hi NarcĂ­s,

Yes, this solves the problem.

Thanks,

Christiaan