Hello,
Is it possible to use psDash with thick lines? With
Series: TChartSeries;
it works fine with
Series.Pen.Style := psDash;
provided
Series.Pen.Width := 1;
With width greater than 1 it comes out like a bad solid line.
I'm using 100 points.
Many thanks in advance.
Ian
LineSeries using psDash
Hi Ian,
What is the height of your chart? I've tested it here and, to see a continous line, you need a chart with a height smaller than 130. Here is the code I've used:
Please, take a look at this thread where this was discussed before too.
What is the height of your chart? I've tested it here and, to see a continous line, you need a chart with a height smaller than 130. Here is the code I've used:
Code: Select all
uses series;
procedure TForm1.FormCreate(Sender: TObject);
var series1: TLineSeries;
begin
Chart1.Align := alClient;
Chart1.View3D := False;
series1 := TLineSeries.Create(nil);
Chart1.AddSeries(series1);
series1.FillSampleValues(100);
series1.Pen.Style := psDash;
series1.Pen.Width := 4;
end;
procedure TForm1.Chart1Resize(Sender: TObject);
begin
Chart1.Title.Text.Text := 'Chart Height: ' + IntToStr(Chart1.Height) + ' Width: ' + IntToStr(Chart1.Width);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Yes but...
Thanks Yeray
I've just had a look at the thread you mention and I'm not surprised that the problem is that the data points are too close together so that it starts drawing after each point. If the points are closer than the length of the dashes, then there is no chance of a space. I encountered this problem years ago when I wrote my own graphics routines, but got round it with a bit of geometry (not difficult). I think my problem was a combination of the graph size and number of points - I think I can get round it.
One point to note about the randomly filled graphs is that the total length of the curve is quite big. For a smooth function, such as a sine curve, or straight line, I think the problem would be encountered earlier (in terms of the graph getting smaller).
Anyway, I think I can sort this out now, so many thanks.
Best regards, Ian
I've just had a look at the thread you mention and I'm not surprised that the problem is that the data points are too close together so that it starts drawing after each point. If the points are closer than the length of the dashes, then there is no chance of a space. I encountered this problem years ago when I wrote my own graphics routines, but got round it with a bit of geometry (not difficult). I think my problem was a combination of the graph size and number of points - I think I can get round it.
One point to note about the randomly filled graphs is that the total length of the curve is quite big. For a smooth function, such as a sine curve, or straight line, I think the problem would be encountered earlier (in terms of the graph getting smaller).
Anyway, I think I can sort this out now, so many thanks.
Best regards, Ian