Oxyplot:蜡烛重叠每根蜡烛

时间:2015-10-14 16:06:43

标签: c# charts oxyplot candlestick-chart

当减少图表时,蜡烛开始重叠另一根蜡烛。

例如

enter image description here

enter image description here

enter image description here

轴系

DateTimeAxis timeSPanAxis1 = new DateTimeAxis()
            {
                Position = AxisPosition.Bottom,
                MinorIntervalType = DateTimeIntervalType.Auto,
                MajorGridlineStyle = LineStyle.Dot,
                MinorGridlineStyle = LineStyle.Dot,
                MajorGridlineColor = OxyColor.FromRgb(44, 44, 44),
                TicklineColor = OxyColor.FromRgb(82, 82, 82)
            };
            PlotModel.Axes.Add(timeSPanAxis1);

            LinearAxis linearAxis1 = new LinearAxis()
            {
                Position = AxisPosition.Right,

                MajorGridlineStyle = LineStyle.Dot,
                MinorGridlineStyle = LineStyle.Dot,
                MajorGridlineColor = OxyColor.FromRgb(44, 44, 44),
                TicklineColor = OxyColor.FromRgb(82, 82, 82)
            };
            PlotModel.Axes.Add(linearAxis1);

和蜡烛棒系列

CandleStickSeries candle = new CandleStickSeries()
            {
                Color = OxyColors.Black,
                IncreasingColor = OxyColor.FromRgb(0,197,49),
                DecreasingColor = OxyColor.FromRgb(255,95,95),
                DataFieldX = "Time",
                DataFieldHigh = "H",
                DataFieldLow = "L",
                DataFieldClose = "C",
                DataFieldOpen = "O",
                TrackerFormatString = "Date: {2}\nOpen: {5:0.00000}\nHigh: {3:0.00000}\nLow: {4:0.00000}\nClose: {6:0.00000}",

            }; 

为什么会这样?如何解决?

1 个答案:

答案 0 :(得分:0)

我刚刚解决了有关十字星蜡烛的问题。

可以在以下位置找到拉取请求 GitHub