以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 图表数据标示---示例+疑问 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=11939) |
||||
-- 作者:qhczy -- 发布时间:2011/8/17 16:11:00 -- 图表数据标示---示例+疑问 示例中2011的数据标示. 那么2010或更多条曲线数据标示怎么标? 每条曲线的线型和标示点大小怎么设置呢?
Dim Chart As WinForm.Chart
|
||||
-- 作者:狐狸爸爸 -- 发布时间:2011/8/17 16:50:00 -- 1、不管多少条线都一样的。 2、修改表示点大小: http://www.foxtable.com/help/topics/1044.htm
|
||||
-- 作者:qhczy -- 发布时间:2011/8/17 16:59:00 -- 以下是引用狐狸爸爸在2011-8-17 16:50:00的发言:
1、不管多少条线都一样的。 2、修改表示点大小: http://www.foxtable.com/help/topics/1044.htm
series.marksize= 3 已经在代码中体现了,实际显出来的曲线只有一条有变化.其它的曲线没有变化.
|
||||
-- 作者:狐狸爸爸 -- 发布时间:2011/8/17 17:05:00 -- Dim Chart As WinForm.Chart Dim Series As WinForm.ChartSeries Chart= e.Form.Controls("Chart1") Chart.SeriesList.Clear() Dim nms() As Integer ={ "1","2","3","4","5","6","7","8","8","10","11","12"} For Each r As Row In Tables("foxtext").Rows Series = Chart.SeriesList.Add() series.marksize= 3 series.Text = r("年份") Series.Length = nms.length For i As Integer = 0 To nms.Length - 1 Series.X(i) = i Series.Y(i) = r(nms(i)) Next Next For i As Integer = 0 To nms.Length - 1 Chart.AxisX.SetValueLabel(i,nms(i)) Next Chart.AxisX.AnnoRotation = 25 Series.TooltipText = "Y = {#YVAL}" \' 此处的数据标示,只标出2011的标示,2010或由动态生成的曲线怎么标示呢? Series.MarkShape = MarkShapeEnum.Dot Chart.AxisX.AnnoWithLabels = True Chart.LegendVisible = True Chart.VisualEffect = True Chart.SeriesList(0).FitType = FitTypeEnum.Spline Chart.SeriesList(1).FitType = FitTypeEnum.Spline \' 假如有多条曲线,而且是动态生成.那线型应该怎么定义呢? Chart.LegendVisible = True Chart.LegendCompass= CompassEnum.South MainTable = Tables("foxtext") MainTable.Font = New Font("宋体",10,FontStyle.Regular) |
||||
-- 作者:qhczy -- 发布时间:2011/8/17 18:10:00 -- Series.TooltipText = "Y = {#YVAL}" \' 此处的数据标示,只标出2011的标示,2010或由动态生成的曲线怎么标示呢?
2010年的曲线还是没有标示... |
||||
-- 作者:狐狸爸爸 -- 发布时间:2011/8/17 21:19:00 -- Dim Chart As WinForm.Chart Dim Series As WinForm.ChartSeries Chart= e.Form.Controls("Chart1") Chart.SeriesList.Clear() Dim nms() As Integer ={ "1","2","3","4","5","6","7","8","8","10","11","12"} For Each r As Row In Tables("foxtext").Rows Series = Chart.SeriesList.Add() series.marksize= 3 Series.FitType = FitTypeEnum.Spline Series.TooltipText = "Y = {#YVAL}" series.Text = r("年份") Series.Length = nms.length For i As Integer = 0 To nms.Length - 1 Series.X(i) = i Series.Y(i) = r(nms(i)) Next Next For i As Integer = 0 To nms.Length - 1 Chart.AxisX.SetValueLabel(i,nms(i)) Next Chart.AxisX.AnnoRotation = 25 Series.TooltipText = "Y = {#YVAL}" \' 此处的数据标示,只标出2011的标示,2010或由动态生成的曲线怎么标示呢? Series.MarkShape = MarkShapeEnum.Dot Chart.AxisX.AnnoWithLabels = True Chart.LegendVisible = True Chart.VisualEffect = True Chart.LegendVisible = True Chart.LegendCompass= CompassEnum.South MainTable = Tables("foxtext") MainTable.Font = New Font("宋体",10,FontStyle.Regular) |
||||
-- 作者:qhczy -- 发布时间:2011/8/18 9:30:00 -- 谢谢, 源数据有小数位的时候,数据标示失真(有的被四舍五入了). |