|
|
|
TDBgrid -> TDBChart
|
|||
|---|---|---|---|
|
#18+
Здравствуйте! Такая проблема - подскажите пожалуйста - мне нужно данные из TDBGrid отобразить на графике в TDBChart, но не все а только часть отвечающую поределенным параметрам - какой фильтр использовать? (Borland C++ Builder 6) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 05.06.2006, 16:50 |
|
||
|
TDBgrid -> TDBChart
|
|||
|---|---|---|---|
|
#18+
Если разберешься, на Дельфе писал, но все то же самое. Нужно малость ручками поработать. Серии самому создавать надо. За предка брал StatisticChart - линию for i:=0 to StatisticChart.SeriesList.Count-1 do StatisticChart.Series .Clear; MaxCountValue:=0; StatisticChart.MaxPointsPerPage:=24; ZQuery1.First; while not ZQuery1.Eof do begin Registered:=false; for i:=0 to StatisticChart.SeriesList.Count-1 do if StatisticChart.Series.Name = 's'+ZQuery1.FindField('shortnum').AsString then begin Registered:=true; break; end; if (not Registered) and (ZQuery1.FindField('count').AsInteger<>0) then begin MySeries:=TLineSeries.Create(Self); MySeries.LinePen.Width:=2; MySeries.Name:='s'+ZQuery1.FindField('shortnum').AsString; MySeries.ParentChart:=StatisticChart; end; for i:=0 to StatisticChart.SeriesList.Count-1 do if StatisticChart.Series.Name = 's'+ZQuery1.FindField('shortnum').AsString then begin TimeValue:=ZQuery1.FindField('date').AsString; if MaxCountValue<ZQuery1.FindField('count').AsInteger then MaxCountValue:=ZQuery1.FindField('count').AsInteger; StatisticChart.Series.AddXY(StrToInt(TimeValue), ZQuery1.FindField('count').AsInteger); break; end; ZQuery1.Next; end; StatisticChart.LeftAxis.Maximum:=MaxCountValue+20; Не знаю, в тему ли, моя задача была отобразить статистику по входящим смс, по графику на каждый номер и тоже по определенным полям таблиц, а точнее по времени и по кол-ву за это время. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.06.2006, 13:49 |
|
||
|
|

start [/forum/topic.php?fid=57&gotonew=1&tid=2031075]: |
0ms |
get settings: |
7ms |
get forum list: |
10ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
168ms |
get topic data: |
12ms |
get first new msg: |
6ms |
get forum data: |
2ms |
get page messages: |
46ms |
get tp. blocked users: |
1ms |
| others: | 231ms |
| total: | 489ms |

| 0 / 0 |
