User (Legacy) Posted October 25, 2006 Report Share Posted October 25, 2006 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 More sharing options...
Software FX Posted October 26, 2006 Report Share Posted October 26, 2006 %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 More sharing options...
User (Legacy) Posted October 26, 2006 Author Report Share Posted October 26, 2006 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 More sharing options...
User (Legacy) Posted October 30, 2006 Author Report Share Posted October 30, 2006 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 >> > > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted October 31, 2006 Author Report Share Posted October 31, 2006 Take a look at the GetTip event. It allows further customization. The thing with 2 strings is why not 3, or 4 ? It is just too specific to your situation. -- Francisco Padron Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.