Jump to content
Software FX Community

Customized Tooltips


User (Legacy)

Recommended Posts

Hello,

I have two series displayed in one same chart. I would like to set the

tooltips programmatically to display the good units of the series.

Here is my code:

////////// Format the tooltip //

string maskString = "%s" + "\n";

maskString = "X: " + "%x" + ", " + "Y: " + "%v " + strUnitSeries

base.ToolTipFormat = maskString;

////////////////////////////////

Is it possible that the string "strUnitSeries" contains a string that is

dependant of the Series over which the user has placed the mouse pointer?

For example, if my mouse pointer is over one point of the Series 1, I would

like to see the following tootltip: "X: 4, Y: 24 Volts" but if my mouse goes

over one point of the Series 2, I would like to see "X: 4, Y: 24 Amps"

Best regards,

--

Olivier Voyer

CYME International T&D

Link to comment
Share on other sites

%s is the series text, so if the series Text is set to "Volts" and "Amps" 

respectively you will get a different text for each series in the tooltip.

Just set strUnitSeries = "%s";

Note:

There is something wrong with this code:

string maskString = "%s" + "\n";

maskString = "X: " + "%x" + ", " + "Y: " + "%v " + strUnitSeries

The second line is overriding the first, so the first line is useless.

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Francisco,

Thank you for the hint. That works fine.

--

Olivier Voyer

CYME International T&D

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

news:rGqUL5Q%23GHA.4084@webserver3.softwarefx.com...

> %s is the series text, so if the series Text is set to "Volts" and "Amps"

> respectively you will get a different text for each series in the tooltip.

> Just set strUnitSeries = "%s";

>

> Note:

>

> There is something wrong with this code:

>

> string maskString = "%s" + "\n";

> maskString = "X: " + "%x" + ", " + "Y: " + "%v " + strUnitSeries

>

> The second line is overriding the first, so the first line is useless.

>

> --

> Francisco Padron

> www.chartfx.com

>

Link to comment
Share on other sites

Hi it's me again,

Just wanted to suggest you something for further versions of ChartFX. It

would be great to have at least two Customizable Text (%s) for the

Tooltips... let me explain.

For example, in my case I would have liked to display both the title and the

unit of the Series, so when the user goes over the chart, he sees something

like that:

Capacitor Voltage

X: 5 s, Y: 45.6 Volts

But since we can only display one customized string (%s), I only display the

unit like this:

X: 5 s, Y: 45.6 Volts

Thanks again,

--

Olivier Voyer

CYME International T&D

"Olivier" <olivier.voyer@cyme.com> wrote in message

news:8DWf$YS%23GHA.644@webserver3.softwarefx.com...

> Francisco,

>

> Thank you for the hint. That works fine.

>

> --

> Olivier Voyer

> CYME International T&D

>

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

> news:rGqUL5Q%23GHA.4084@webserver3.softwarefx.com...

>> %s is the series text, so if the series Text is set to "Volts" and "Amps"

>> respectively you will get a different text for each series in the

>> tooltip.

>> Just set strUnitSeries = "%s";

>>

>> Note:

>>

>> There is something wrong with this code:

>>

>> string maskString = "%s" + "\n";

>> maskString = "X: " + "%x" + ", " + "Y: " + "%v " + strUnitSeries

>>

>> The second line is overriding the first, so the first line is useless.

>>

>> --

>> Francisco Padron

>> www.chartfx.com

>>

>

>

>

post-2107-13922380965725_thumb.png

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...