This is a migrated thread and some comments may be shown as answers.

Zero replaced in series ItemToolTipFormat

1 Answer 48 Views
Chart
This is a migrated thread and some comments may be shown as answers.
AdrianP
Top achievements
Rank 2
AdrianP asked on 07 Feb 2012, 09:50 AM
Hello,

I have a problem with the ItemToolTipFormat from SeriesDefinition: the format is loaded dynamically from
database, and some of the formats contain zero. The problem is that zero is always replaced by the Y value,
being treated as a placeholder. How can I enter zero in the tooltipformat and prevent the automatic
replace?

Here's my code: seriesMapping.SeriesDefinition.ItemToolTipFormat = string.Format("{0}", col["Description"].ToString()); Thank you, Adrian

1 Answer, 1 is accepted

Sort by
0
AdrianP
Top achievements
Rank 2
answered on 07 Feb 2012, 10:22 AM
I found the solution, to escape the zero:

  seriesMapping.SeriesDefinition.ItemToolTipFormat = string.Format("{0}", col["Description"].ToString().Replace("0","\\0"));


Thank you, you can consider the thread closed.
Adrian


Tags
Chart
Asked by
AdrianP
Top achievements
Rank 2
Answers by
AdrianP
Top achievements
Rank 2
Share this question
or