Hi,
I have a composite chart (column chart + splinechart) , both series have the same number of point with the same dates, however, the column chart is not aligned with the date of the splince chart.
Do you have any explanation ?
Thanks
Hello,
Could you please try the following code:
ultraChart1.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval;
Please feel free to let me know if I misunderstood you or if you have any other questions.
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.
Hi Boris ,
No it does not fix the problem, this is what I have know :In addition I want to see the first points and the last points of the curve and and have both bars closer (2 by 2) here is my scenario :
//column layers use a string, GroupBySeries x axis AxisItem columnXAxis = new AxisItem(ChartAlphaRealized, AxisNumber.X_Axis); columnXAxis.DataType = AxisDataType.String; columnXAxis.SetLabelAxisType = Infragistics.UltraChart.Core.Layers.SetLabelAxisType.GroupBySeries; columnXAxis.Labels.ItemFormat = AxisItemLabelFormat.ItemLabel; columnXAxis.Labels.SeriesLabels.Format = AxisSeriesLabelFormat.SeriesLabel; columnXAxis.MajorGridLines.Visible = false; columnXAxis.LineDrawStyle = LineDrawStyle.Solid; ChartAlphaRealized.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval; columnXAxis.Visible = false; area.Axes.Add(columnXAxis); //line layers use a string, ContinuousData x axis AxisItem lineXAxis = new AxisItem(ChartAlphaRealized, AxisNumber.X_Axis); lineXAxis.DataType = AxisDataType.String; lineXAxis.SetLabelAxisType = Infragistics.UltraChart.Core.Layers.SetLabelAxisType.ContinuousData; lineXAxis.MajorGridLines.Visible = false; lineXAxis.Labels.ItemFormat = AxisItemLabelFormat.Custom; lineXAxis.Labels.ItemFormatString = "<ITEM_LABEL>"; lineXAxis.LineDrawStyle = LineDrawStyle.Solid; lineXAxis.Visible = true; lineXAxis.LineColor = Color.Black; lineXAxis.Labels.SeriesLabels.Format = AxisSeriesLabelFormat.SeriesLabel; ChartAlphaRealized.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval; area.Axes.Add(lineXAxis); //the layers can share the numeric y axis. AxisItem YAxis = new AxisItem(ChartAlphaRealized, AxisNumber.Y_Axis); //area.Axes.Clear(); YAxis.DataType = AxisDataType.Numeric; YAxis.OrientationType = AxisNumber.Y_Axis; YAxis.MajorGridLines.Visible = false; YAxis.RangeType = AxisRangeType.Custom; if ( MAxAlphaCumulValue <= 1) MAxAlphaCumulValue = 1; YAxis.RangeMax = Math.Round(MAxAlphaCumulValue); YAxis.RangeMin = Math.Round(MinAlphaCumulValue); YAxis.TickmarkInterval = GlobalClass.StepCalc(MinAlphaCumulValue, MAxAlphaCumulValue); YAxis.TickmarkStyle = AxisTickStyle.DataInterval; YAxis.Labels.ItemFormatString = "<DATA_VALUE:##.##>"; area.Axes.Add(YAxis); //the layers can share the numeric y axis. AxisItem YAxis2 = new AxisItem(ChartAlphaRealized, AxisNumber.Y2_Axis); //area.Axes.Clear(); YAxis2.DataType = AxisDataType.Numeric; YAxis2.Labels.ItemFormat = AxisItemLabelFormat.DataValue; YAxis2.MajorGridLines.Visible = false; YAxis2.RangeType = AxisRangeType.Custom; YAxis2.RangeMax = MAxVolumeCumulValue; YAxis2.RangeMin = 0; YAxis2.LineColor = Color.LightGreen; YAxis2.Labels.ItemFormatString = "<DATA_VALUE:##.##>"; YAxis2.TickmarkInterval = 5; YAxis2.TickmarkStyle = AxisTickStyle.DataInterval; area.Axes.Add(YAxis2); ChartLayerAppearance columnLayer = new ChartLayerAppearance(); columnLayer.AxisX = columnXAxis; columnLayer.AxisY = YAxis2; columnLayer.ChartArea = area; columnLayer.ChartType = ChartType.ColumnChart; columnLayer.Series.Add(VolumeNum); columnLayer.Series.Add(VolumeNumDV); columnLayer.SwapRowsAndColumns = true; ChartAlphaRealized.CompositeChart.ChartLayers.Add(columnLayer); ChartLayerAppearance lineLayer = new ChartLayerAppearance(); lineLayer.AxisX = lineXAxis; lineLayer.AxisY = YAxis; lineLayer.ChartArea = area; lineLayer.ChartType = ChartType.SplineChart; lineLayer.Series.Add(AlphaReal_st); lineLayer.Series.Add(seriesInit); lineLayer.Series.Add(VWAP_St); lineLayer.Series.Add(ClosedPrice_St); lineLayer.Series.Add(VWAP_Sector); lineLayer.Series.Add(ClosedPrice_Sector); lineLayer.Series.Add(TradedPrice_Sector); lineLayer.Series.Add(seriesInit_Sector); ChartAlphaRealized.CompositeChart.ChartLayers.Add(lineLayer); //create LineAppearance for 1st NumericTimeSeries ChartLayerAppearance lineLayer_line = new ChartLayerAppearance(); lineLayer_line.AxisX = lineXAxis; lineLayer_line.AxisY = YAxis; lineLayer_line.ChartArea = area; lineLayer_line.ChartType = ChartType.LineChart; LineAppearance la = new LineAppearance(ChartAlphaRealized); la.IconAppearance.Icon = SymbolIcon.None; la.Thickness = 2; LineChartAppearance lca = new LineChartAppearance(); lca.LineAppearances.Add(la); lineLayer_line.ChartTypeAppearance = lca; lineLayer_line.Series.Add(SerieLineZeros); ChartAlphaRealized.CompositeChart.ChartLayers.Add(lineLayer_line); TradedPrice_Sector.Visible = false; NewAlphaChart = ChartAlphaRealized; tab_AlphaRealized.Controls.Add(NewAlphaChart); ChartPureAlpha.Data.DataBind(); ChartAlphaRealized.Data.DataBind();
thanks
Hello,Could you please let me know of your whole code.
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
It works thanks a lot for your help Boris
Maybe one possible approach to achieve desired behavior could be if you are using properties:
axisX.RangeMin = 1;axisX.RangeMax = 12;axisX.RangeType = AxisRangeType.Custom;axisX.Labels.ItemFormat = AxisItemLabelFormat.DataValue;axisX.TickmarkInterval = 1;axisX.TickmarkStyle = AxisTickStyle.DataInterval;
Please take a look at the attached sample and video file, where I was able to reproduce your issue without using the properties above all, and than the fix when I`m using these properties.
Let me know if you have any questions
Sorry , wrong topic, I still have the issue , actually, I have 2 X-axis , one for the columnchart , another one for the spline chart.
I hide the columnchart one so that the reason why there are this shift, but is there are a way via fillscene to realign columnchart and splinechart ?