Jump to content
Software FX Community

2 Series Line Chart


User (Legacy)

Recommended Posts

You will have to assign the values between 20 and 48 for the second series

to CHART_HIDDEN

--

Regards

JC

Software FX Support

"Gene Fojtik" <fojtikg@email.uophx.edu> wrote in message

news:PTeWsUMtBHA.1412@webserver1.softwarefx.com...

> I have 2 seriese both lines...

> One series has 48 points the other has 20...

> I want to stop the line at the 20th point and not drop down to the x axis

> and continue along until the 48th point.

>

> Can I set this series to not show Null values, or not draw the line after

> the series count has ended?

>

> Thanks

> Gene

>

>

Link to comment
Share on other sites

Thanks,

Gene

"Software FX Support" <support@softwarefx.com> wrote in message

news:Apcb2SZtBHA.2872@webserver1.softwarefx.com...

> You will have to assign the values between 20 and 48 for the second series

> to CHART_HIDDEN

>

> --

> Regards

>

> JC

> Software FX Support

>

> "Gene Fojtik" <fojtikg@email.uophx.edu> wrote in message

> news:PTeWsUMtBHA.1412@webserver1.softwarefx.com...

> > I have 2 seriese both lines...

> > One series has 48 points the other has 20...

> > I want to stop the line at the 20th point and not drop down to the x

axis

> > and continue along until the 48th point.

> >

> > Can I set this series to not show Null values, or not draw the line

after

> > the series count has ended?

> >

> > Thanks

> > Gene

> >

> >

>

>

Link to comment
Share on other sites

  • 5 months later...

I'm having the same exact issue.. Yet the CHART_HIDDEN only partially works.

Say I have 3 series (2000, 2001, 2002) in a line chart. For 2000 and 2001

the series ends at December which is correct. Yet 2003 ends at July. If no

value is returned prior to July then the CHART_HIDDEN works. If there are

values, it charts it (which is also correct). For the months after July

(which there is no data for at this point), the line drops down to 0. I

have pasted my code in hopes someone might be able to assist me.

Chart.OpenDataEX COD_VALUES,3,COD_UNKNOWN

adoRsGraph.MoveFirst

i = -1 'need totart at 0 for the series count. We're adding 1 for each new

year (see below).

vYear = 0

vMonth = 0

Do Until adoRsGraph.EOF

''If year does not match, start new series. Set value back to 0 for

chart points.

''Set series legend to year date value

If trim(Year(adoRsGraph("date"))) <> trim(vYear) then

i = i + 1

j = 0

Chart.ThisSerie=i

Chart.SerLeg(i) = Year(adoRsGraph("date"))

End If

if i > 1 then

Chart.ValueEx(i, j) = CHART_HIDDEN

else

Chart.ValueEx(i, j) = adoRsGraph("value")

end if

'Chart.Value(j) = adoRsGraph("value")

Chart.Legend(j) = adoRsGraph("monthname")

vMonth = month(adoRsGraph("date"))

vYear = year(adoRsGraph("date"))

adoRsGraph.MoveNext

j = j + 1

Loop

As stated above, for the 3rd series (2002), the points are hidden up until

August. Then the line starts at August and goes until December at the value

of 0 (right along the X axis) Based on my code (if i > 1), I would have

expected all of the 3rd series to be hidden and not just up until July.

Hopefully this is not too confusing. Any help would be greatly

appreciated!!

Patrick

"Gene Fojtik" <fojtikg@email.uophx.edu> wrote in message

news:BO#ulqitBHA.1412@webserver1.softwarefx.com...

> Thanks,

> Gene

>

> "Software FX Support" <support@softwarefx.com> wrote in message

> news:Apcb2SZtBHA.2872@webserver1.softwarefx.com...

> > You will have to assign the values between 20 and 48 for the second

series

> > to CHART_HIDDEN

> >

> > --

> > Regards

> >

> > JC

> > Software FX Support

> >

> > "Gene Fojtik" <fojtikg@email.uophx.edu> wrote in message

> > news:PTeWsUMtBHA.1412@webserver1.softwarefx.com...

> > > I have 2 seriese both lines...

> > > One series has 48 points the other has 20...

> > > I want to stop the line at the 20th point and not drop down to the x

> axis

> > > and continue along until the 48th point.

> > >

> > > Can I set this series to not show Null values, or not draw the line

> after

> > > the series count has ended?

> > >

> > > Thanks

> > > Gene

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

I do not see in your code how non-existent values after the last one you

"find" will get assigned CHART_HIDDEN, when your code finds a new year it

starts from 0 but it seems to me that you would have to store in an array

the last assigned point for each of your years, then after the loop assign

all the values for each series from the last-assigned+1 to the max point as

CHART_HIDDEN

> Based on my code (if i > 1), I would have

> expected all of the 3rd series to be hidden and not just up until July

Your code is only setting HIDDEN for the points in the 3rd series that are

found in your db, e.g. if series1 or series2 had 12 points and series3 only

7 you are only assigning the first 7 points as hidden.

--

Regards

JC

Software FX Support

"PD" <pdaniel@commonwealth.com> wrote in message

news:8ZNTQvpLCHA.2748@webserver1.softwarefx.com...

> I'm having the same exact issue.. Yet the CHART_HIDDEN only partially

works.

> Say I have 3 series (2000, 2001, 2002) in a line chart. For 2000 and 2001

> the series ends at December which is correct. Yet 2003 ends at July. If

no

> value is returned prior to July then the CHART_HIDDEN works. If there are

> values, it charts it (which is also correct). For the months after July

> (which there is no data for at this point), the line drops down to 0. I

> have pasted my code in hopes someone might be able to assist me.

>

> Chart.OpenDataEX COD_VALUES,3,COD_UNKNOWN

> adoRsGraph.MoveFirst

> i = -1 'need totart at 0 for the series count. We're adding 1 for each new

> year (see below).

> vYear = 0

> vMonth = 0

>

> Do Until adoRsGraph.EOF

> ''If year does not match, start new series. Set value back to 0 for

> chart points.

> ''Set series legend to year date value

> If trim(Year(adoRsGraph("date"))) <> trim(vYear) then

> i = i + 1

> j = 0

> Chart.ThisSerie=i

> Chart.SerLeg(i) = Year(adoRsGraph("date"))

> End If

> if i > 1 then

> Chart.ValueEx(i, j) = CHART_HIDDEN

> else

> Chart.ValueEx(i, j) = adoRsGraph("value")

> end if

> 'Chart.Value(j) = adoRsGraph("value")

> Chart.Legend(j) = adoRsGraph("monthname")

> vMonth = month(adoRsGraph("date"))

> vYear = year(adoRsGraph("date"))

> adoRsGraph.MoveNext

> j = j + 1

> Loop

>

> As stated above, for the 3rd series (2002), the points are hidden up until

> August. Then the line starts at August and goes until December at the

value

> of 0 (right along the X axis) Based on my code (if i > 1), I would have

> expected all of the 3rd series to be hidden and not just up until July.

>

> Hopefully this is not too confusing. Any help would be greatly

> appreciated!!

> Patrick

>

>

> "Gene Fojtik" <fojtikg@email.uophx.edu> wrote in message

> news:BO#ulqitBHA.1412@webserver1.softwarefx.com...

> > Thanks,

> > Gene

> >

> > "Software FX Support" <support@softwarefx.com> wrote in message

> > news:Apcb2SZtBHA.2872@webserver1.softwarefx.com...

> > > You will have to assign the values between 20 and 48 for the second

> series

> > > to CHART_HIDDEN

> > >

> > > --

> > > Regards

> > >

> > > JC

> > > Software FX Support

> > >

> > > "Gene Fojtik" <fojtikg@email.uophx.edu> wrote in message

> > > news:PTeWsUMtBHA.1412@webserver1.softwarefx.com...

> > > > I have 2 seriese both lines...

> > > > One series has 48 points the other has 20...

> > > > I want to stop the line at the 20th point and not drop down to the x

> > axis

> > > > and continue along until the 48th point.

> > > >

> > > > Can I set this series to not show Null values, or not draw the line

> > after

> > > > the series count has ended?

> > > >

> > > > Thanks

> > > > Gene

> > > >

> > > >

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Ok. I think that's where I was confused.  Seeing that there is no data for

the 3rd series after July, it couldn't hide them so it defaulted to 0. I

have placed a loop to hide any points that occur at the end of my recordset

(what you suggest). It works great now. Thanks for the feedback!

"Software FX Support" <support@softwarefx.com> wrote in message

news:NSMh#RzLCHA.1280@webserver1.softwarefx.com...

> I do not see in your code how non-existent values after the last one you

> "find" will get assigned CHART_HIDDEN, when your code finds a new year it

> starts from 0 but it seems to me that you would have to store in an array

> the last assigned point for each of your years, then after the loop assign

> all the values for each series from the last-assigned+1 to the max point

as

> CHART_HIDDEN

>

> > Based on my code (if i > 1), I would have

> > expected all of the 3rd series to be hidden and not just up until July

>

> Your code is only setting HIDDEN for the points in the 3rd series that are

> found in your db, e.g. if series1 or series2 had 12 points and series3

only

> 7 you are only assigning the first 7 points as hidden.

>

> --

> Regards

>

> JC

> Software FX Support

>

> "PD" <pdaniel@commonwealth.com> wrote in message

> news:8ZNTQvpLCHA.2748@webserver1.softwarefx.com...

> > I'm having the same exact issue.. Yet the CHART_HIDDEN only partially

> works.

> > Say I have 3 series (2000, 2001, 2002) in a line chart. For 2000 and

2001

> > the series ends at December which is correct. Yet 2003 ends at July. If

> no

> > value is returned prior to July then the CHART_HIDDEN works. If there

are

> > values, it charts it (which is also correct). For the months after July

> > (which there is no data for at this point), the line drops down to 0. I

> > have pasted my code in hopes someone might be able to assist me.

> >

> > Chart.OpenDataEX COD_VALUES,3,COD_UNKNOWN

> > adoRsGraph.MoveFirst

> > i = -1 'need totart at 0 for the series count. We're adding 1 for each

new

> > year (see below).

> > vYear = 0

> > vMonth = 0

> >

> > Do Until adoRsGraph.EOF

> > ''If year does not match, start new series. Set value back to 0 for

> > chart points.

> > ''Set series legend to year date value

> > If trim(Year(adoRsGraph("date"))) <> trim(vYear) then

> > i = i + 1

> > j = 0

> > Chart.ThisSerie=i

> > Chart.SerLeg(i) = Year(adoRsGraph("date"))

> > End If

> > if i > 1 then

> > Chart.ValueEx(i, j) = CHART_HIDDEN

> > else

> > Chart.ValueEx(i, j) = adoRsGraph("value")

> > end if

> > 'Chart.Value(j) = adoRsGraph("value")

> > Chart.Legend(j) = adoRsGraph("monthname")

> > vMonth = month(adoRsGraph("date"))

> > vYear = year(adoRsGraph("date"))

> > adoRsGraph.MoveNext

> > j = j + 1

> > Loop

> >

> > As stated above, for the 3rd series (2002), the points are hidden up

until

> > August. Then the line starts at August and goes until December at the

> value

> > of 0 (right along the X axis) Based on my code (if i > 1), I would have

> > expected all of the 3rd series to be hidden and not just up until July.

> >

> > Hopefully this is not too confusing. Any help would be greatly

> > appreciated!!

> > Patrick

> >

> >

> > "Gene Fojtik" <fojtikg@email.uophx.edu> wrote in message

> > news:BO#ulqitBHA.1412@webserver1.softwarefx.com...

> > > Thanks,

> > > Gene

> > >

> > > "Software FX Support" <support@softwarefx.com> wrote in message

> > > news:Apcb2SZtBHA.2872@webserver1.softwarefx.com...

> > > > You will have to assign the values between 20 and 48 for the second

> > series

> > > > to CHART_HIDDEN

> > > >

> > > > --

> > > > Regards

> > > >

> > > > JC

> > > > Software FX Support

> > > >

> > > > "Gene Fojtik" <fojtikg@email.uophx.edu> wrote in message

> > > > news:PTeWsUMtBHA.1412@webserver1.softwarefx.com...

> > > > > I have 2 seriese both lines...

> > > > > One series has 48 points the other has 20...

> > > > > I want to stop the line at the 20th point and not drop down to the

x

> > > axis

> > > > > and continue along until the 48th point.

> > > > >

> > > > > Can I set this series to not show Null values, or not draw the

line

> > > after

> > > > > the series count has ended?

> > > > >

> > > > > Thanks

> > > > > Gene

> > > > >

> > > > >

> > > >

> > > >

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...