M
maz
Hello all, I already able to create OWC chart using tab-delimited input
strings, but problem raise when using arrays as the data inputs.
I have this C# ASP.NET code :
################
String r,w;
.....
## input arrays
string[] x = new string[20];
int[] y = new int[20];
......
### input string
r="b";w="10";
i=0;
while(i<20){
## test data
r=r+"\tb";w=w+"\t10";
x="a"; y=56;
i++;
}
.....
ChartSpace mychartspace = new ChartSpace(); mychartspace.Clear();
ChChart mychart = mychartspace.Charts.Add(0);
ChSeries myseries = mychart.SeriesCollection.Add(0);
.....
myseries.SetData(ChartDimensionsEnum.chDimCategories,(int)ChartSpecialDataSo
urcesEnum.chDataLiteral,r);
myseries.SetData(ChartDimensionsEnum.chDimValues,(int)ChartSpecialDataSource
sEnum.chDataLiteral,w);
.....
#####################
Everything run well when I use ineficient tab-delimited string "r" and "w"
as the input in SetData(). The chart show all data correctly. However, when
I use arrays "x" and "y" on SetData(), I get chart without values, only the
scale is displayed. Any suggestion?
strings, but problem raise when using arrays as the data inputs.
I have this C# ASP.NET code :
################
String r,w;
.....
## input arrays
string[] x = new string[20];
int[] y = new int[20];
......
### input string
r="b";w="10";
i=0;
while(i<20){
## test data
r=r+"\tb";w=w+"\t10";
x="a"; y=56;
i++;
}
.....
ChartSpace mychartspace = new ChartSpace(); mychartspace.Clear();
ChChart mychart = mychartspace.Charts.Add(0);
ChSeries myseries = mychart.SeriesCollection.Add(0);
.....
myseries.SetData(ChartDimensionsEnum.chDimCategories,(int)ChartSpecialDataSo
urcesEnum.chDataLiteral,r);
myseries.SetData(ChartDimensionsEnum.chDimValues,(int)ChartSpecialDataSource
sEnum.chDataLiteral,w);
.....
#####################
Everything run well when I use ineficient tab-delimited string "r" and "w"
as the input in SetData(). The chart show all data correctly. However, when
I use arrays "x" and "y" on SetData(), I get chart without values, only the
scale is displayed. Any suggestion?