Skip to content

Replies

0
David Negley
David Negley answered on Sep 21, 2009 3:42 PM

LingaReddy,

I think this is an issue with the temp folder on your server.  see this article: http://blog.jtbworld.com/2008/12/systemioioexception-file-exists-and.html

or

http://www.google.com/search?q=gettempfilename+The+file+exists

0
David Negley
David Negley answered on Dec 8, 2008 6:16 PM

the axis label layout behaviors don't selectively remove certain labels, they just attempt to reduce the font size, stagger the labels, rotate them, etc. to prevent collisions.

 try setting Axis.X.TickmarkStyle = Smart to prevent collisions by selectively removing labels.

you can also set Axis.X.TickmarkStyle = DataInterval and Axis.X.TickmarkInterval = 5 to display every 5th label.

0
David Negley
David Negley answered on Nov 4, 2008 6:47 PM

 the chart uses the public properties (not fields) on your data objects to determine the item labels and data values.  add these lines to your ChartDataValue class and both CollectionBase and List<T> scenarios should work fine.

    public decimal OrigDataConverted { get { return this.origDataConverted; } }
    public string OrigData { get { return this.origData; } }

0
David Negley
David Negley answered on Oct 8, 2008 8:17 PM

 each stack is represented by one NumericSeries, bound to one ValueColumn.  If you have multiple columns of data, you need to create multiple NumericSeries, one for each column.

If the data appears "sideways," just toggle the SwapRowsAndColumns property on your chart layer.

0
David Negley
David Negley answered on Sep 25, 2008 4:35 PM

that is an unusual combination of charts because bar charts have a numeric x-axis and line charts have a numeric y-axis … but anyway, here's some code to get you started

 

this.ultraChart1.ChartType = ChartType.Composite;

NumericSeries stackSeries1 = new NumericSeries();
stackSeries1.Label = "Stack One";
stackSeries1.Points.Add(new NumericDataPoint(1.0, "A", false));
stackSeries1.Points.Add(new NumericDataPoint(2.0, "B", false));
stackSeries1.Points.Add(new NumericDataPoint(3.0, "C", false));

NumericSeries stackSeries2 = new NumericSeries();
stackSeries2.Label = "Stack Two";
stackSeries2.Points.Add(new NumericDataPoint(4.0, "D", false));
stackSeries2.Points.Add(new NumericDataPoint(5.0, "E", false));
stackSeries2.Points.Add(new NumericDataPoint(6.0, "F", false));

NumericSeries lineSeries1 = new NumericSeries();
lineSeries1.Points.Add(new NumericDataPoint(7.0, "G", false));
lineSeries1.Points.Add(new NumericDataPoint(8.0, "H", false));
lineSeries1.Points.Add(new NumericDataPoint(9.0, "I", false));

NumericSeries lineSeries2 = new NumericSeries();
lineSeries2.Points.Add(new NumericDataPoint(8.0, "J", false));
lineSeries2.Points.Add(new NumericDataPoint(7.0, "K", false));
lineSeries2.Points.Add(new NumericDataPoint(6.0, "L", false));

ChartArea area = new ChartArea();

AxisItem xAxisForStackBar = new AxisItem();
xAxisForStackBar.OrientationType = AxisNumber.X_Axis;
xAxisForStackBar.DataType = AxisDataType.Numeric;
xAxisForStackBar.Extent = 10;
xAxisForStackBar.Labels.ItemFormatString = "<DATA_VALUE:0.0>";
xAxisForStackBar.TickmarkStyle = AxisTickStyle.Smart;

AxisItem yAxisForStackBar = new AxisItem();
yAxisForStackBar.OrientationType = AxisNumber.Y_Axis;
yAxisForStackBar.DataType = AxisDataType.String;
yAxisForStackBar.SetLabelAxisType = SetLabelAxisType.GroupBySeries;
yAxisForStackBar.Labels.SeriesLabels.FormatString = "<SERIES_LABEL>";

AxisItem xAxisForLine = new AxisItem();
xAxisForLine.OrientationType = AxisNumber.X_Axis;
xAxisForLine.DataType = AxisDataType.String;
xAxisForLine.SetLabelAxisType = SetLabelAxisType.ContinuousData;
xAxisForLine.Labels.ItemFormatString = "<ITEM_LABEL>";

AxisItem yAxisForLine = new AxisItem();
yAxisForLine.OrientationType = AxisNumber.Y_Axis;
yAxisForLine.DataType = AxisDataType.Numeric;
yAxisForLine.Extent = 10;
yAxisForLine.Labels.ItemFormatString = "<DATA_VALUE:0.0>";
yAxisForLine.TickmarkStyle = AxisTickStyle.Smart;

area.Axes.Add(xAxisForStackBar);
area.Axes.Add(yAxisForStackBar);
area.Axes.Add(xAxisForLine);
area.Axes.Add(yAxisForLine);

ChartLayerAppearance stackBarLayer = new ChartLayerAppearance();
stackBarLayer.ChartType = ChartType.StackBarChart;
stackBarLayer.Series.Add(stackSeries1);
stackBarLayer.Series.Add(stackSeries2);
stackBarLayer.ChartArea = area;
stackBarLayer.AxisX = xAxisForStackBar;
stackBarLayer.AxisY = yAxisForStackBar;

ChartLayerAppearance lineLayer = new ChartLayerAppearance();
lineLayer.ChartType = ChartType.LineChart;
lineLayer.Series.Add(lineSeries1);
lineLayer.Series.Add(lineSeries2);
lineLayer.ChartArea = area;
lineLayer.AxisX = xAxisForLine;
lineLayer.AxisY = yAxisForLine;

this.ultraChart1.CompositeChart.ChartAreas.Add(area);
this.ultraChart1.CompositeChart.ChartLayers.Add(stackBarLayer);
this.ultraChart1.CompositeChart.ChartLayers.Add(lineLayer);