以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]图系的颜色 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=84315) |
||||
-- 作者:dqlgood -- 发布时间:2016/4/28 10:53:00 -- [求助]图系的颜色 Dim Chart As WinForm.Chart Dim Series As WinForm.ChartSeries Dim t As Table = Tables("历史数据") Dim n As Integer = t.Compute("Max(序号)") - 120 t.filter = "[序号] > \'" & n & "\'" Chart= Forms("K线图").Controls("Chart1") Chart.ChartType = ChartTypeEnum.Candle Chart.AxisY.Text = "价格" Chart.SeriesList.Clear() Series = Chart.SeriesList.Add() Series.LineColor = Color.Blue \'Series.LineColor = Color.Red \'Series.MarkSize = 3 Series.Length = t.Rows.Count For i As Integer = 0 To t.Rows.Count - 1 Series.X(i) = i Series.Y(i) = t.Rows(i)("最高") Series.Y1(i) = t.Rows(i)("最低") Series.Y2(i) = t.Rows(i)("开盘") Series.Y3(i) = t.Rows(i)("收盘") Next 我想将同一坐标系的[收盘]>=[开盘]设置为红色,[收盘]<[开盘]设置为蓝色;即空心蜡烛图为红色,实心蜡烛图为蓝色;能实现码?
|
||||
-- 作者:大红袍 -- 发布时间:2016/4/28 10:58:00 -- 你可以尝试再增加一个红色的图系
Series = Chart.SeriesList.Add()
不会做,上传具体例子测试。 |
||||
-- 作者:大红袍 -- 发布时间:2016/4/28 11:10:00 -- 哦,这样写
Dim bChart = e.Form.Controls("Chart1").basecontrol bChart.ChartGroups(0).HiLoData.FillTransparent = False |
||||
-- 作者:大红袍 -- 发布时间:2016/4/28 11:13:00 --
|
||||
-- 作者:wfkbabro -- 发布时间:2021/3/16 21:15:00 -- 感谢,收藏。 |