Jump to content
Software FX Community

Series Chart problem


User (Legacy)
 Share

Recommended Posts

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") %>

Link to comment
Share on other sites

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") %>

>

>

>

>

>

Link to comment
Share on other sites

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") %>

>

>

>

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...