Hi Guys!
Follwoing problem:
I habe a series with datetime and I want to format the tooltip to show the date (without time) and the data.
So I use
.Tooltips.FormatString ="<SERIES_LABEL:dd.MM.yyyy> - <DATA_VALUE:#,000> TEU"
but this has no effect. For the SEIRES_LABEL the same code is working
Hello polfi,
There are different approaches to solve this task, but the solution depend of your concrete scenario, chart type, series type, datasource. I made small sample for you where I`m using the settings below together with
ultraChart1.Tooltips.Format =TooltipStyle.Custom;
void ultraChart1_DataItemOver(object sender, Infragistics.UltraChart.Shared.Events.ChartDataEventArgs e)
{
object[] item = e.Primitive.Value as object[];
if(item != null)
ultraChart1.Tooltips.FormatString = "My Series <SERIES_LABEL>" + Environment.NewLine + "Axis Y = <ITEM_LABEL> : Axis X = " + String.Format("{0:dd/MM/yyyy}", Convert.ToDateTime(item[0]).Date);
}
Please take a look at the attached sample and video file for more details and let me know if you have any questions.
Regards
Here is the video file
this is the sample
Hi!
Tahanks, that works.
I use the following Code:
Me.chartDailyBookings.Tooltips.FormatString = FormatDateTime(e.ColumnLabel, DateFormat.ShortDate) + Environment.NewLine + FormatNumber(e.Primitive.Value, 0) & " TEU"
But why do you include the <SERIES_LABEL>" and <ITEM_LABEL> in your code?What I see this is not neccessary.....
Thanks for the feedback.
Yes you are right. This is not neccessary, but I include it just for example.
Regrads