以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 图表中线特别显示 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=133945) |
-- 作者:yangwenghd -- 发布时间:2019/4/23 22:52:00 -- 图表中线特别显示 老师!图标的中心线可以用其他颜色和线条显示吗?感谢 感谢 此主题相关图片如下:qq截图20190423224743.jpg Dim Chart As WinForm.Chart = e.Form.Controls("Chart4") \' 引用窗口中的图表 Dim series As winform.ChartSeries chart.AxisX.Font = new font("宋体", 10) \'设置图表字体大小 Chart.SeriesList.Clear() \'清除图表原来的图系 Chart.AxisX.ClearValueLabel Chart.ChartType = ChartTypeEnum.XYPlot Dim ls As new List(Of String) Dim t As Table = Tables("财务汇总窗口_Table13") t.Filter = iif(t.filter>"", "(" & t.filter & ")", "1=1") & " And 年份 Is not null" \'For Each c As object In e.Form.Controls \'If Typeof c Is winform.CheckBox Then \'If c.Checked Then \'ls.add(c.Name) \'End If \'End If \'Next For Each c As object In e.Form.Controls If Typeof c Is winform.CheckBox Then If c.Checked AndAlso Tables("财务汇总").Cols.Contains(c.Name) Then ls.add(c.Name) End If End If Next For i As Integer = 0 To ls.Count - 1 Series = Chart.SeriesList.Add() \'增加一个图系 Series.Text = ls(i) Series.Length = t.Rows.count Dim idx As Integer = 0 For r As Integer = 0 To t.Rows.Count - 1 Series.TooltipText = ls(i) & " : {#YVAL}" Series.X(r) = r Series.Y(r) = t.Rows(r)(ls(i)) Next Next For r As Integer = 0 To t.Rows.Count - 1 Chart.AxisX.SetValueLabel(r, t.Rows(r)("年份") & "-" &t.Rows(r)("月份")) \'指定字符表示 Next Chart.AxisX.AnnoRotation = - 45 \'X轴标示逆时针旋转45度 Chart.LegendVisible = True \'显示图列 Chart.LegendCompass= CompassEnum.East \'图列显示在东方(右方) Chart.AxisX.AnnoWithLabels = True \'启用字符标示 \'Chart.AxisX.AnnoWithLabels = True \'启用字符标示 Chart.VisualEffect = True \'加上这一行,让你的图表更漂亮 Chart.LegendVisible = True \'显示图列 Chart.AxisX.AnnoRotation = - 45 \'X轴标示逆时针旋转45度 Chart.LegendCompass= CompassEnum.South \'图列显示在南方(底端) |
-- 作者:有点蓝 -- 发布时间:2019/4/23 23:17:00 -- 参考:http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=55270 |