Foxtable(狐表)用户栏目专家坐堂 → 图表中线特别显示


  共有2631人关注过本帖树形打印复制链接

主题:图表中线特别显示

帅哥哟,离线,有人找我吗?
yangwenghd
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2707 积分:18062 威望:0 精华:0 注册:2013/4/9 10:41:00
图表中线特别显示  发帖心情 Post By: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 '图列显示在南方(底端)

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111381 积分:566969 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/4/23 23:17:00 [只看该作者]


 回到顶部