Hello NG,
I'm creating a composite Chart within a TD of a table, the compositechart should have 100 % width and 400px height. Unfortunately the chart get's centered within the TD. Here is my code
Me.UltraChart2.BorderWidth = New Unit(0)
'Create the chart area
myChartArea.Border.Thickness = 0
myChartArea.BoundsMeasureType = MeasureType.Percentage
Me.UltraChart2.CompositeChart.ChartAreas.Add(myChartArea)
' Create a Y axis
yAxis.axisNumber = AxisNumber.Y_Axis
yAxis.DataType = AxisDataType.Numeric
yAxis.SetLabelAxisType = SetLabelAxisType.GroupBySeries
yAxis.Labels.ItemFormatString = "<DATA_VALUE:###,###,###,##0.00>"
yAxis.TickmarkStyle = AxisTickStyle.Smart
yAxis.LineThickness = 1
myChartArea.Axes.Add(yAxis)
' Create the X axis
xAxisForColumnChart.OrientationType = AxisNumber.X_Axis
xAxisForColumnChart.DataType = AxisDataType.String
xAxisForColumnChart.Labels.Orientation = TextOrientation.VerticalLeftFacing
xAxisForColumnChart.SetLabelAxisType = SetLabelAxisType.GroupBySeries
xAxisForColumnChart.Labels.ItemFormatString = "<ITEM_LABEL>"
xAxisForColumnChart.LineThickness = 1
xAxisForColumnChart.Labels.SeriesLabels.Visible = False
'Create the chart layer
myChartArea.Axes.Add(xAxisForColumnChart)
columnLayer.ChartType = ChartType.ColumnChart
columnLayer.ChartArea = myChartArea
columnLayer.AxisX = xAxisForColumnChart
columnLayer.AxisY = yAxis
'Assign the series data
columnLayer.Series.Add(columnSeries)
xAxisForLineChart.OrientationType = AxisNumber.X2_Axis
xAxisForLineChart.DataType = AxisDataType.String
xAxisForLineChart.SetLabelAxisType = SetLabelAxisType.ContinuousData
xAxisForLineChart.LineThickness = 0
xAxisForLineChart.Margin.Near.Value = 0
xAxisForLineChart.Margin.Far.Value = 0
myChartArea.Axes.Add(xAxisForLineChart)
lineLayer.ChartType = ChartType.LineChart
lineLayer.ChartArea = myChartArea
lineLayer.AxisX = xAxisForLineChart
lineLayer.AxisY = yAxis
Dim lineSeries As NumericSeries = Me.GetNumericSeriesForLineChart()
lineLayer.Series.Add(lineSeries)
Thanks in advance for your help
Stefan
Hi,
Can you please provide the code in the function of GetNumericSeriesForColumnChart()
regards
Sreenivas
Hi there,
I have a composite chart with StackColumn and LineChart. My datatable has pivotted datatable so I am having issues with numeric series databind. COuld you tell me how you bound the data to your numeric series. Thanks,
just solved the problem, the x and y axis extend was set to 100 ... sry ;-)