起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 141|回复: 8

【结】DecisionChart标题参数**

[复制链接]
发表于 2008-4-25 16:37:30 | 显示全部楼层 |阅读模式
想在 DecisionChart  显示的图中  显示查询的时间段 这一参数  如何处理?

末尾 标题不能传递参数啊

1.jpg

26.15 KB, 下载次数: 106

回复

使用道具 举报

 楼主| 发表于 2008-4-25 17:35:41 | 显示全部楼层
:stupidag:
回复 支持 反对

使用道具 举报

发表于 2008-4-28 08:45:49 | 显示全部楼层
给楼主一个建议,在设计环境设计一下,然后把这个控件赋值粘贴到记事本中,就能看到代码了,然后参考这个代码写就可以了,楼主先尝试做一下,有问题,请把你的代码帖出来我看看,
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-28 09:45:27 | 显示全部楼层
好,多谢建议!
有点难度!

我的目的只要在打印DecisionChart  图的时候  知道查询的时什么时间段的结果就行了

现在看到的只是一个图,没有显示是什么时间。
DecisionChart 控件的标题中要是能传递参数 是不是更完美呢。

你说的有点难度,我试试。
那个高手是否可以做个案例呢?学学
回复 支持 反对

使用道具 举报

发表于 2008-4-28 10:22:29 | 显示全部楼层
呵呵,其实很简单的,你设置一下,然后赋值粘贴到记事本上,找到你需要设置的地方(一般用字母,不要用汉字,汉字会变成其他的码的),例如我把设置的地方1楼,红字显示“时间”这个地方修改为“aaa”,那么赋值粘贴到记事本上的代码就是

object DecisionChart3: TDecisionChart
  Left = 0
  Top = 0
  Width = 786
  Height = 520
  BottomWall.Brush.Color = clScrollBar
  Foot.Brush.Color = clScrollBar
  Foot.Color = clScrollBar
  LeftWall.Brush.Color = clScrollBar
  Title.Brush.Color = clScrollBar
  Title.Color = clScrollBar
  Title.Font.Charset = GB2312_CHARSET
  Title.Font.Color = clBlue
  Title.Font.Height = -16
  Title.Font.Name = #23435#20307
  Title.Font.Style = []
  Title.Text.Strings = (
    'aaa ')
  BackColor = clScrollBar
  BottomAxis.LabelsFont.Charset = GB2312_CHARSET
  BottomAxis.LabelsFont.Color = clBlack
  BottomAxis.LabelsFont.Height = -12
  BottomAxis.LabelsFont.Name = #23435#20307
  BottomAxis.LabelsFont.Style = []
  BottomAxis.Title.Font.Charset = GB2312_CHARSET
  BottomAxis.Title.Font.Color = clBlack
  BottomAxis.Title.Font.Height = -12
  BottomAxis.Title.Font.Name = #23435#20307
  BottomAxis.Title.Font.Style = []
  LeftAxis.LabelsFont.Charset = GB2312_CHARSET
  LeftAxis.LabelsFont.Color = clBlack
  LeftAxis.LabelsFont.Height = -12
  LeftAxis.LabelsFont.Name = #23435#20307
  LeftAxis.LabelsFont.Style = []
  LeftAxis.Title.Font.Charset = GB2312_CHARSET
  LeftAxis.Title.Font.Color = clBlack
  LeftAxis.Title.Font.Height = -12
  LeftAxis.Title.Font.Name = #23435#20307
  LeftAxis.Title.Font.Style = []
  Legend.Brush.Color = clScrollBar
  Legend.Font.Charset = GB2312_CHARSET
  Legend.Font.Color = clBlack
  Legend.Font.Height = -12
  Legend.Font.Name = #23435#20307
  Legend.Font.Style = []
  RightAxis.LabelsFont.Charset = GB2312_CHARSET
  RightAxis.LabelsFont.Color = clBlack
  RightAxis.LabelsFont.Height = -12
  RightAxis.LabelsFont.Name = #23435#20307
  RightAxis.LabelsFont.Style = []
  RightAxis.Title.Font.Charset = GB2312_CHARSET
  RightAxis.Title.Font.Color = clBlack
  RightAxis.Title.Font.Height = -12
  RightAxis.Title.Font.Name = #23435#20307
  RightAxis.Title.Font.Style = []
  TopAxis.LabelsFont.Charset = GB2312_CHARSET
  TopAxis.LabelsFont.Color = clBlack
  TopAxis.LabelsFont.Height = -12
  TopAxis.LabelsFont.Name = #23435#20307
  TopAxis.LabelsFont.Style = []
  TopAxis.Title.Font.Charset = GB2312_CHARSET
  TopAxis.Title.Font.Color = clBlack
  TopAxis.Title.Font.Height = -12
  TopAxis.Title.Font.Name = #23435#20307
  TopAxis.Title.Font.Style = []
  Align = alClient
  TabOrder = 0
  DecisionBroker = DecisionBroker3
  object Series5: TBarSeries
    Active = False
    ColorEachPoint = True
    Marks.ArrowLength = 20
    Marks.Font.Charset = GB2312_CHARSET
    Marks.Font.Color = clBlack
    Marks.Font.Height = -12
    Marks.Font.Name = #23435#20307
    Marks.Font.Style = []
    Marks.Style = smsLabelPercent
    Marks.Visible = True
    SeriesColor = clRed
    Title = 'Template: '#21333#20301
    SingleRow = False
    BarBrush.Color = clScrollBar
    XValues.DateTime = False
    XValues.Name = 'X'#36724
    XValues.Multiplier = 1
    XValues.Order = loAscending
    YValues.DateTime = False
    YValues.Name = #26465#24418
    YValues.Multiplier = 1
    YValues.Order = loNone
    Identifier = 'Template: '#21333#20301
    Style = 61
  end
end

用查找就找到了aaa赋值的代码了,Title.Text.Strings,它属于DecisionChart的,所以代码为
DecisionChart3.Title.Text.Strings[0] := '生生世世';
回复 支持 反对

使用道具 举报

发表于 2008-4-29 13:49:16 | 显示全部楼层
这个ok没?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-29 16:35:32 | 显示全部楼层
还没有测试,在忙别的事,有情况马上反馈
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-29 16:57:29 | 显示全部楼层
刚测试通过,搞定!!多谢!
回复 支持 反对

使用道具 举报

发表于 2008-4-29 17:51:13 | 显示全部楼层
ok
不客气,结
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-12 07:38 , Processed in 0.046731 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表