Jump to content
Software FX Community

Gradient BackGround and PSS


User (Legacy)

Recommended Posts

I am re-posting this.. it's been amost ten days since any response to the

last post titled "Simple PSS Example with C#".

To recap, JT sent me some sample code of C# and PSS, that I got working. My

chart however, was still failing, after some trial and error I discovered

that if I removed the Gradient Background code below PSS returns the Chart

fine. If I add the code below to JT's sample it too fails. JT's sample is

attached ..can you please confirm the issue.

-Matt

GradientBackground myGradient = new

GradientBackground(GradientType.Vertical); myGradient.Color[0] = Color.Blue;

myGradient.Color[1] = Color.Black; myGradient.Position[0] = 0;

myGradient.Position[1] = 1; Chart1.BackObject = myGradient;

Chart1.InsideBackObject = myGradient;

Link to comment
Share on other sites

I just retested JT's code along with your gradient code with our most recent

build (1353) and it works fine.

We recently fixed an issue related to GradientBackground serialization that

will in fact affect your scenario, even though we recommend you download the

most recent service pack (you may also want to make sure that the new

ChartFX dlls are copied to the bin subdirectory of the PSS folder after you

restart the PSS service) you could also use the following workaround

replace

/*

myGradient.Color[0] = Color.Blue;

myGradient.Color[1] = Color.Black;

myGradient.Position[0] = 0;

myGradient.Position[1] = 1;

*/

with

myGradient.ColorFrom = Color.Red;

myGradient.ColorTo = Color.Green;

Note that the new code will achieve the same results, the serialization bug

affected both the Color and Position arrays but you can use the ColorFrom

and ColorTo properties if only two colors will be used.

--

Regards,

JC

Software FX Support

"Matt McBride" <matthew.mcbride@tfn.com> wrote in message

news:nOkPVnsgDHA.3600@WEBSERVER1...

> I am re-posting this.. it's been amost ten days since any response to the

> last post titled "Simple PSS Example with C#".

>

> To recap, JT sent me some sample code of C# and PSS, that I got working.

My

> chart however, was still failing, after some trial and error I discovered

> that if I removed the Gradient Background code below PSS returns the Chart

> fine. If I add the code below to JT's sample it too fails. JT's sample

is

> attached ..can you please confirm the issue.

> -Matt

>

>

> GradientBackground myGradient = new

> GradientBackground(GradientType.Vertical); myGradient.Color[0] =

Color.Blue;

> myGradient.Color[1] = Color.Black; myGradient.Position[0] = 0;

> myGradient.Position[1] = 1; Chart1.BackObject = myGradient;

> Chart1.InsideBackObject = myGradient;

>

>

>

>

>

>

>

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...