Jump to content
Software FX Community

Client side colour problem


User (Legacy)

Recommended Posts

Hi,

I am trying to use the client side scripting (vbscript) to change the colour

of a point when the user selects it on a graph. Before I change the colour I

save the point's current colour so I can change it back when the user

selects another point. The issue is that the colour being reported by the

script chart.Point.Item(series, point).Color is incorrect, it just seems to

be a random color. When it comes time to change the point's colour back it

no longer matches the rest of the series. Is there a solution to this

problem?

Regards,

Grey.

Link to comment
Share on other sites

Thanks for the reply Francisco.

Unfortunately this has not solved my problem. I am explicitly setting point

colours when I generate the graph on the server side. Are you saying that I

also have to explicitly set the point colours on the client side to use

client side scripting? Also, Color.Empty does not work with vbscript client

side scripting, it just gives me an "object required" error.

Regards,

Grey.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:MaECvs7XFHA.4092@webserver3.softwarefx.com...

> If you never set the color for a point, it will not have one.

>

> To reset the color of a point to its original value do:

>

> Point.[series, point].Color = Color.Empty;

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

The problem here is that Color is a .NET color, not a HTML color, so the 

color being returned to you is correct is just that JavaScript doesn't know

how to read it.

I'm not sure if it is possible to interact with .NET colors from JavaScript,

I will do some research on this.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...