G
Guest
Use this code to set the min/max.
set c=CS.constants
CS.charts(0).axes(c.chAxisPositionBottom).Scaling.Maximum
= X
CS.charts(0).axes(c.chAxisPositionBottom).Scaling.Minimum
= Y
Thao Moua
OWC Webchart Support
This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
set c=CS.constants
CS.charts(0).axes(c.chAxisPositionBottom).Scaling.Maximum
= X
CS.charts(0).axes(c.chAxisPositionBottom).Scaling.Minimum
= Y
Thao Moua
OWC Webchart Support
This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
-----Original Message-----
I have a problem with the display of values on the x- axis.
The x-axis is a time-axis. The minimum value is not displayed at the extreme
left of the chart, and the maximum value is not displayed at the extreme right
of the chart either. See the image attached.
What is possible to do in order to have the whole width of the chart used for
the display ?
Here is the code below :
ChartSpace1 = new ChartSpaceClass();
ChartSpace1.Border.Color = "Black";
ChChart Chart1 = ChartSpace1.Charts.Add(0);
Chart1.Axes[0].HasTitle = true;
Chart1.Axes[0].Title.Caption = "Date";
Chart1.Axes[1].HasTitle = true;
Chart1.Axes[1].Title.Caption = "MW/h";
Chart1.HasLegend = true;sitionBottom;Chart1.Legend.Position=ChartLegendPositionEnum.chLegendPo
ChSeries Chart1_Series = Chart1.SeriesCollection.Add(0);
Chart1_Series.Type = ChartChartTypeEnum.chChartTypeScatterLine;
Chart1.SeriesCollection[0].Interior.Color = "Wheat";
Chart1_Series.SetData(
ChartDimensionsEnum.chDimSeriesNames,
Convert.ToInt32 (ChartSpecialDataSourcesEnum.chDataLiteral),
"Fermes");
Chart1_Series.SetData(
ChartDimensionsEnum.chDimXValues,
-1,
aX );
Chart1.Axes[1].NumberFormat = "dd/MM/yyyy";
Chart1.Axes[1].Orientation =
(int) ChartLabelOrientationEnum.chLabelOrientationDownward;
Chart1_Series.SetData(
ChartDimensionsEnum.chDimYValues,
-1,
aY );
How to set the minimum/maximum value of a time-axis ?