Jump to content
Software FX Community

Obscure bug in SVG output using Gallery.Curves and series with different point counts


User (Legacy)

Recommended Posts

Ok, this one is tricky. This entire example is specific to SVG output.

I am using a recordset that has 3 tables. This forces me to load all data by

hand. In this situation, I first get the maximum rowcount from these 3

tables to see what the total number of points will be. I then spin through

each table; if I get past the index of the table but am still under

maxcount, I start setting hidden points as the documentation suggests.

Now, this works fine if the gallery is "lines". When I set it to curves, I

get an odd effect. If the Gallery.Curve series has the most points

(rowcount==maxcount) it draws perfect. If the curve series has less than

maxcount, meaning I have set at least one hidden point, I get a strange

curve that extends off of the right of the chart about 100000 pixels. How do

I know it's 100000 pixels? Because this is at the end of the path for that

line:

<path style="stroke:rgb(72,61,139); fill:none; "

d=".........552.6666,225.6667 554,226C555.3333,226.3333 *139607.5*,181.1667

558,222" />

The value between the asterixs is WAY too big. It looks like whatever is

trying to calculate your bezier control points goes berzerk when it hits

hidden points. The path that draws correctly ends itself with some line-to

points, like so:

<path style="stroke:rgb(72,61,139); fill:none; "

d=".........554,289C555.3333,289.8333 557.3333,293.1667

558,294L558,324L50,324L50,264" />

so maybe the short series curve just never hits the line-to termination

code.

Thanks for your continuing support.

Link to comment
Share on other sites

I tried the following code and the generated curve in the SVG output looks

fine

chart1.Series[0].Gallery = Gallery.Curve;

chart1.Series[1].Gallery = Gallery.Lines;

chart1.OpenData(COD.Values,2,5);

chart1.Value[0,0] = 10;

chart1.Value[0,1] = 10;

chart1.Value[0,2] = 14;

chart1.Value[0,3] = Chart.Hidden;

chart1.Value[0,4] = Chart.Hidden;

chart1.Value[1,0] = 6;

chart1.Value[1,1] = 8;

chart1.Value[1,2] = 2;

chart1.Value[1,3] = 4;

chart1.Value[1,4] = 5;

chart1.CloseData(COD.Values);

Are you setting any other properties in your chart that could help us

duplicate the bug ?

--

Regards,

JC

Software FX Support

"Trey Schultz" <trey.schultz@serveron.com> wrote in message

news:CXltralaCHA.3620@webserver1.softwarefx.com...

> Ok, this one is tricky. This entire example is specific to SVG output.

>

> I am using a recordset that has 3 tables. This forces me to load all data

by

> hand. In this situation, I first get the maximum rowcount from these 3

> tables to see what the total number of points will be. I then spin through

> each table; if I get past the index of the table but am still under

> maxcount, I start setting hidden points as the documentation suggests.

>

> Now, this works fine if the gallery is "lines". When I set it to curves, I

> get an odd effect. If the Gallery.Curve series has the most points

> (rowcount==maxcount) it draws perfect. If the curve series has less than

> maxcount, meaning I have set at least one hidden point, I get a strange

> curve that extends off of the right of the chart about 100000 pixels. How

do

> I know it's 100000 pixels? Because this is at the end of the path for that

> line:

>

> <path style="stroke:rgb(72,61,139); fill:none; "

> d=".........552.6666,225.6667 554,226C555.3333,226.3333

*139607.5*,181.1667

> 558,222" />

>

> The value between the asterixs is WAY too big. It looks like whatever is

> trying to calculate your bezier control points goes berzerk when it hits

> hidden points. The path that draws correctly ends itself with some line-to

> points, like so:

>

> <path style="stroke:rgb(72,61,139); fill:none; "

> d=".........554,289C555.3333,289.8333 557.3333,293.1667

> 558,294L558,324L50,324L50,264" />

>

> so maybe the short series curve just never hits the line-to termination

> code.

>

> Thanks for your continuing support.

>

>

>

>

Link to comment
Share on other sites

One difference is that the chart's gallery is set to lines, and the series

is set to curves. Also, I am setting X values as dates. Your code is not

setting any x values.

Not sure if this matters, either, but in the first test case that did this,

the longer series was set up first.

Looking for more clues...

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

news:TOlo53vaCHA.1316@webserver1.softwarefx.com...

> I tried the following code and the generated curve in the SVG output looks

> fine

>

> chart1.Series[0].Gallery = Gallery.Curve;

> chart1.Series[1].Gallery = Gallery.Lines;

>

> chart1.OpenData(COD.Values,2,5);

> chart1.Value[0,0] = 10;

> chart1.Value[0,1] = 10;

> chart1.Value[0,2] = 14;

> chart1.Value[0,3] = Chart.Hidden;

> chart1.Value[0,4] = Chart.Hidden;

>

> chart1.Value[1,0] = 6;

> chart1.Value[1,1] = 8;

> chart1.Value[1,2] = 2;

> chart1.Value[1,3] = 4;

> chart1.Value[1,4] = 5;

> chart1.CloseData(COD.Values);

>

> Are you setting any other properties in your chart that could help us

> duplicate the bug ?

>

> --

> Regards,

>

> JC

> Software FX Support

> "Trey Schultz" <trey.schultz@serveron.com> wrote in message

> news:CXltralaCHA.3620@webserver1.softwarefx.com...

> > Ok, this one is tricky. This entire example is specific to SVG output.

> >

> > I am using a recordset that has 3 tables. This forces me to load all

data

> by

> > hand. In this situation, I first get the maximum rowcount from these 3

> > tables to see what the total number of points will be. I then spin

through

> > each table; if I get past the index of the table but am still under

> > maxcount, I start setting hidden points as the documentation suggests.

> >

> > Now, this works fine if the gallery is "lines". When I set it to curves,

I

> > get an odd effect. If the Gallery.Curve series has the most points

> > (rowcount==maxcount) it draws perfect. If the curve series has less than

> > maxcount, meaning I have set at least one hidden point, I get a strange

> > curve that extends off of the right of the chart about 100000 pixels.

How

> do

> > I know it's 100000 pixels? Because this is at the end of the path for

that

> > line:

> >

> > <path style="stroke:rgb(72,61,139); fill:none; "

> > d=".........552.6666,225.6667 554,226C555.3333,226.3333

> *139607.5*,181.1667

> > 558,222" />

> >

> > The value between the asterixs is WAY too big. It looks like whatever is

> > trying to calculate your bezier control points goes berzerk when it hits

> > hidden points. The path that draws correctly ends itself with some

line-to

> > points, like so:

> >

> > <path style="stroke:rgb(72,61,139); fill:none; "

> > d=".........554,289C555.3333,289.8333 557.3333,293.1667

> > 558,294L558,324L50,324L50,264" />

> >

> > so maybe the short series curve just never hits the line-to termination

> > code.

> >

> > Thanks for your continuing support.

> >

> >

> >

> >

>

>

Link to comment
Share on other sites

I tried setting X values (both as numbers and dates) and also tried making

the first series the longest but I could not reproduce the problem.

If you have a real-life chart where the problem is reproducible, please

export the chart in binary format and email the chart.

--

Regards,

JC

Software FX Support

"Trey Schultz" <trey.schultz@serveron.com> wrote in message

news:kn#E8gxaCHA.3620@webserver1.softwarefx.com...

> One difference is that the chart's gallery is set to lines, and the series

> is set to curves. Also, I am setting X values as dates. Your code is not

> setting any x values.

>

> Not sure if this matters, either, but in the first test case that did

this,

> the longer series was set up first.

>

> Looking for more clues...

>

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

> news:TOlo53vaCHA.1316@webserver1.softwarefx.com...

> > I tried the following code and the generated curve in the SVG output

looks

> > fine

> >

> > chart1.Series[0].Gallery = Gallery.Curve;

> > chart1.Series[1].Gallery = Gallery.Lines;

> >

> > chart1.OpenData(COD.Values,2,5);

> > chart1.Value[0,0] = 10;

> > chart1.Value[0,1] = 10;

> > chart1.Value[0,2] = 14;

> > chart1.Value[0,3] = Chart.Hidden;

> > chart1.Value[0,4] = Chart.Hidden;

> >

> > chart1.Value[1,0] = 6;

> > chart1.Value[1,1] = 8;

> > chart1.Value[1,2] = 2;

> > chart1.Value[1,3] = 4;

> > chart1.Value[1,4] = 5;

> > chart1.CloseData(COD.Values);

> >

> > Are you setting any other properties in your chart that could help us

> > duplicate the bug ?

> >

> > --

> > Regards,

> >

> > JC

> > Software FX Support

> > "Trey Schultz" <trey.schultz@serveron.com> wrote in message

> > news:CXltralaCHA.3620@webserver1.softwarefx.com...

> > > Ok, this one is tricky. This entire example is specific to SVG output.

> > >

> > > I am using a recordset that has 3 tables. This forces me to load all

> data

> > by

> > > hand. In this situation, I first get the maximum rowcount from these 3

> > > tables to see what the total number of points will be. I then spin

> through

> > > each table; if I get past the index of the table but am still under

> > > maxcount, I start setting hidden points as the documentation suggests.

> > >

> > > Now, this works fine if the gallery is "lines". When I set it to

curves,

> I

> > > get an odd effect. If the Gallery.Curve series has the most points

> > > (rowcount==maxcount) it draws perfect. If the curve series has less

than

> > > maxcount, meaning I have set at least one hidden point, I get a

strange

> > > curve that extends off of the right of the chart about 100000 pixels.

> How

> > do

> > > I know it's 100000 pixels? Because this is at the end of the path for

> that

> > > line:

> > >

> > > <path style="stroke:rgb(72,61,139); fill:none; "

> > > d=".........552.6666,225.6667 554,226C555.3333,226.3333

> > *139607.5*,181.1667

> > > 558,222" />

> > >

> > > The value between the asterixs is WAY too big. It looks like whatever

is

> > > trying to calculate your bezier control points goes berzerk when it

hits

> > > hidden points. The path that draws correctly ends itself with some

> line-to

> > > points, like so:

> > >

> > > <path style="stroke:rgb(72,61,139); fill:none; "

> > > d=".........554,289C555.3333,289.8333 557.3333,293.1667

> > > 558,294L558,324L50,324L50,264" />

> > >

> > > so maybe the short series curve just never hits the line-to

termination

> > > code.

> > >

> > > Thanks for your continuing support.

> > >

> > >

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...