User (Legacy) Posted June 3, 2002 Report Posted June 3, 2002 Hi, I am using the below code to plot a series chart. However, it displays a blank chart. Can someone tell me what is wrong in the below code. I tried passing the datavalues in an array and that works fine, but if I do it as below it doesn't Please help Thanks - Rich <% Set chart = Server.CreateObject("ChartFX.WebServer") ' The samples look better in white chart.RgbBk = RGB(255,255,255) ' Let's use a 2D line chart Chart.ChartType = LINES Chart.Chart3D = False ' Open Communications channel for two series and 8 points Chart.OpenDataEx COD_VALUES,2,8 ' First data series Chart.ThisSerie=0 Chart.Value(0) = 10 Chart.Value(1) = 14 Chart.Value(2) = 12 Chart.Value(3) = 16 Chart.Value(4) = 8 Chart.Value(5) = 6 Chart.Value(6) = 22 Chart.Value(7) = 24 ' Second data series Chart.ThisSerie=1 Chart.Value(0) = 32 Chart.Value(1) = 15 Chart.Value(2) = 8 Chart.Value(3) = 24 Chart.Value(4) = 22 Chart.Value(5) = 16 Chart.Value(6) = 6 Chart.Value(7) = 27 ' Close the communications channel Chart.CloseData COD_VALUES %> <%= chart.GetHtmlTag("500","350") %>
User (Legacy) Posted June 3, 2002 Author Report Posted June 3, 2002 I forgot to mention, I also tried using the below code and this also did not work <% set ChartFX1 = Server.CreateObject("ChartFX.WebServer") ChartFX1.OpenDataEx 1,2,4 ChartFX1.Series(0).YValue(0) = 4 ChartFX1.Series(0).YValue(1) = 6 ChartFX1.Series(0).YValue(2) = 3 ChartFX1.Series(0).YValue(3) = 5 ChartFX1.Series(1).YValue(0) = 3 ChartFX1.Series(1).YValue(1) = 2 ChartFX1.Series(1).YValue(2) = 5 ChartFX1.Series(1).YValue(3) = 4 ChartFX1.CloseData 1 %> <%= ChartFX1.GetHtmlTag(415,245,"Auto","Chart1") %> <% Set ChartFX1=nothing %> Thanks - Rich "Rich" <none@none.com> wrote in message news:jO9bZ3zCCHA.1444@webserver1.softwarefx.com... > Hi, > I am using the below code to plot a series chart. However, it displays a > blank chart. Can someone tell me what is wrong in the below code. I tried > passing the datavalues in an array and that works fine, but if I do it as > below it doesn't > > Please help > Thanks > - Rich > > <% > Set chart = Server.CreateObject("ChartFX.WebServer") > > ' The samples look better in white > chart.RgbBk = RGB(255,255,255) > ' Let's use a 2D line chart > Chart.ChartType = LINES > Chart.Chart3D = False > > ' Open Communications channel for two series and 8 points > Chart.OpenDataEx COD_VALUES,2,8 > > ' First data series > Chart.ThisSerie=0 > Chart.Value(0) = 10 > Chart.Value(1) = 14 > Chart.Value(2) = 12 > Chart.Value(3) = 16 > Chart.Value(4) = 8 > Chart.Value(5) = 6 > Chart.Value(6) = 22 > Chart.Value(7) = 24 > > ' Second data series > Chart.ThisSerie=1 > Chart.Value(0) = 32 > Chart.Value(1) = 15 > Chart.Value(2) = 8 > Chart.Value(3) = 24 > Chart.Value(4) = 22 > Chart.Value(5) = 16 > Chart.Value(6) = 6 > Chart.Value(7) = 27 > > ' Close the communications channel > Chart.CloseData COD_VALUES > %> > <%= chart.GetHtmlTag("500","350") %> > > > > >
Software FX Posted June 3, 2002 Report Posted June 3, 2002 Are you including our INC file ? If not, can you try replacing COD_VALUES with 1 BTW, you can also use the following code (replace COD_VALUES with 1 if not using INC file) Chart.OpenDataEx COD_VALUES,2,4 Chart.ValueEx(0,0) = 10 Chart.ValueEx(0,1) = 14 Chart.ValueEx(0,2) = 12 ... Chart.ValueEx(1,0) = 32 Chart.ValueEx(1,1) = 15 Chart.ValueEx(1,2) = 8 Chart.CloseData COD_VALUES -- Regards JC Software FX Support "Rich" <none@none.com> wrote in message news:jO9bZ3zCCHA.1444@webserver1.softwarefx.com... > Hi, > I am using the below code to plot a series chart. However, it displays a > blank chart. Can someone tell me what is wrong in the below code. I tried > passing the datavalues in an array and that works fine, but if I do it as > below it doesn't > > Please help > Thanks > - Rich > > <% > Set chart = Server.CreateObject("ChartFX.WebServer") > > ' The samples look better in white > chart.RgbBk = RGB(255,255,255) > ' Let's use a 2D line chart > Chart.ChartType = LINES > Chart.Chart3D = False > > ' Open Communications channel for two series and 8 points > Chart.OpenDataEx COD_VALUES,2,8 > > ' First data series > Chart.ThisSerie=0 > Chart.Value(0) = 10 > Chart.Value(1) = 14 > Chart.Value(2) = 12 > Chart.Value(3) = 16 > Chart.Value(4) = 8 > Chart.Value(5) = 6 > Chart.Value(6) = 22 > Chart.Value(7) = 24 > > ' Second data series > Chart.ThisSerie=1 > Chart.Value(0) = 32 > Chart.Value(1) = 15 > Chart.Value(2) = 8 > Chart.Value(3) = 24 > Chart.Value(4) = 22 > Chart.Value(5) = 16 > Chart.Value(6) = 6 > Chart.Value(7) = 27 > > ' Close the communications channel > Chart.CloseData COD_VALUES > %> > <%= chart.GetHtmlTag("500","350") %> > > > > >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.