• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 890
  • Last Modified:

Draw chart using Tchart and displaying the axis

Hi all,
right now i'm doing a project that I have to display a chart. The data was taken from the database table.

1. Do you have any example how to draw that ? ( previously I was doing it using the TDBChart, but not I nedd to do that using the TChart)

2. I'm using 'date of the record' to be the x-axis, but instead of the date, I want to display the day of the week (for example 1 for monday, 2 for tuesday... and so on) any solution for that..??

ok I think that's all.... I Really... really need the help.... Thanks alottt ^^
0
pipinana02
Asked:
pipinana02
1 Solution
 
BinskyCommented:
Hi,

1 - I usually use a TSeriesList for displaying of data, this will probably work from a database as well...
--> To fill a serieslist :
      for Index := 1 to max do
      begin
         tempY := DataY;
         tempX := DataY;
         Chart.Series[1].Add(tempY, tempX);
      end;
2 - I'm not sure about this, you might want to check the :     TChartAxis.DateTimeFormat property help text.

Robin
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now