hi
I have some issue of chart.
1. Can the extent of axis be scaled automatically?
I was checked axis's label in ChartDrawItem event and I can get the text from Infragistics.UltraChart.Core.Primitives.Text.
I'll try to measure width of text and set extent using Graphics.MeasureString method. But I can't find text's axis.
2. I want to see all data, whatever axis's RangeType is Automatic
example, ChartType is ColumnChart and add series included datapoint(value is 100 and 200 and 300). And Axis.Y.RangeType is Automatic.
Then Axis.Y is start 100 so first datapoint' column is disappeared.
3. I want to use NumericTimeSeries except holiday. Is it possible?
4. Disappeared label of axis if i use scroll. Sample like this :
this.ultraChart1.ChartType = ChartType.BarChart;
this.ultraChart1.Data.SwapRowsAndColumns = true;
this.ultraChart1.Axis.Y.Labels.Visible = false;
this.ultraChart1.Axis.Y.ScrollScale.Visible = true;
this.ultraChart1.Axis.Y.ScrollScale.Scale = 0.5;
NumericSeries seriesA = new NumericSeries();
seriesA.Label = "AAAAAAAAA";
this.ultraChart1.Series.Add(seriesA);
NumericSeries seriesB = new NumericSeries();
seriesB.Label = "BBBBBBBBB";
this.ultraChart1.Series.Add(seriesB);
Random random = new Random();
for (int i = 0; i < 100; i++)
{
seriesA.Points.Add(new NumericDataPoint(random.NextDouble(), i.ToString(), false));
seriesB.Points.Add(new NumericDataPoint(random.NextDouble(), i.ToString(), false));
}
5. I want to locate axis middle of chart when chart data have negative and positive value.
like this:
thanks..
gussman said:1. Can the extent of axis be scaled automatically?
no. i don't think the technique you're using will work, because by the time ChartDrawItem is called, the axis has already been drawn at a certain location, just like the text labels you are measuring in that event. the position of any element in the SceneGraph can be changed in a FillSceneGraph event handler, but moving an axis at this time would require a lot of other things to be moved along with it.
if you must measure strings to determine the axis extent, I recommend measuring the strings in your datasource before they are drawn on the chart.
gussman said:2. I want to see all data, whatever axis's RangeType is Automatic
try setting the Data.ZeroAligned property to True.
gussman said:3. I want to use NumericTimeSeries except holiday. Is it possible?
Sorry, no. To achieve this, you would have to use a regular NumericSeries with 365 datapoints minus one for each holiday.
gussman said:4. Disappeared label of axis if i use scroll. Sample like this :
Since there are 100 points per series and a label needs about 10 pixels of height to display, you will not see axis labels on this chart until it is well over 1000 pixels in height. this might help a little:
this.ultraChart1.BarChart.SeriesSpacing = 0;
gussman said:5. I want to locate axis middle of chart when chart data have negative and positive value.