现有一公式,x=3×ch(6t)-4sh(2t),其中t为自变量,x为因变量,如何用chart图表来显示?还请高手指点,能否提供些现成的代码提示一下,没用过chart图表,感到很茫然。
解决方案 »
- 关于cxgrid动态添加button列和click响应事件
- 关于其他程序里控件的句柄问题!请大侠帮忙!
- 很难的SQL,谢谢帮忙!
- 想问个问题 如果现在有一种新的图形格式出现 我如果想写个组件来显示它 我应该先得到什么资料呢
- 有没有能格式化像excel中的单元格格式中的格式代码的控件?
- 请教高手关于TSocketConnection的连接超时问题...头疼中...
- Dll的动态调用和静态调用哪一种好?如果dll窗体很多,该用那一种调用方法?
- 寻找这样的函数,请进。。。。
- 如何实现想Window2000一样,网线一掉马上知道。
- FastReport 打印格式问题
- accept
- udp中接收端怎么还原发送端的数据
procedure TCellPlotFrame.Chart_CellPlotMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
HintStr: string;
TmpRect: TRect;
i, YAxis: Integer;
TmpSeries: TCustomSeries;
XValue, YValue: double;
begin
for i := 0 to FSeriesList.Count - 1 do
begin
TmpSeries := PTCellSeries(FSeriesList.Items[i])^.FCellSeries;
with TmpSeries do
begin
{ 判断曲线与竖线相交 }
if (CalcXPosValue(MinXValue) > X) or (CalcXPosValue(MaxXValue) < X) then
Continue;
{ 从小到大判断相交点 }
for YAxis := Chart_CellPlot.ChartRect.Top to Chart_CellPlot.ChartRect.Bottom do
begin
if Clicked(X, YAxis) > -1 then
HintStr := HintStr + Format('%s:%.1f ', [TmpSeries.Title, YScreenToValue(YAxis)]);
end;
end;
end; if HintStr <> '' then
begin
TmpRect := Rect(Mouse.CursorPos.X - Length(HintStr) * 6, Mouse.CursorPos.Y - 18,
Mouse.CursorPos.X, Mouse.CursorPos.Y - 4);
FHintWindow.ActivateHint(TmpRect, HintStr); {此处显示hint}
end;
end;