The default tooltip includes the series name, value and category; when I use a TooltipTemplate I cannot see how to access the series name - just the value and category. I cannot find an example that seems to show this. Is there a way? I am looking to have a tooltip that shows, series name, a formatted date and a formatted value. Here is is my working code without the series name. I am using a for loop to create multiple line series.
<RadzenChart Style="height:450px;">
<RadzenCategoryAxis Padding="20" Formatter=@FormatDate>
<RadzenAxisTitle Text="Time" />
</RadzenCategoryAxis>
<RadzenValueAxis FormatString="{0:F2}">
<RadzenGridLines Visible="true" />
<RadzenAxisTitle Text=@GetUnits(sensorTypeData.SensorTypeName) />
</RadzenValueAxis>
@for (uint deviceIndex = 0; deviceIndex < m_listSensors?.Count; deviceIndex++)
{
<RadzenLineSeries Smooth="true" Data=@sensorTypeData.Data?[ @deviceIndex ] Title=@m_listSensors[(int)@deviceIndex].Location CategoryProperty="Date" ValueProperty="Value" Stroke="@GetLineColour( @sensorTypeData.SensorTypeName, @deviceIndex)" LineType=@GetLineType(deviceIndex)>
<TooltipTemplate Context="datapoint">
<div>@datapoint.Date.ToString("dd MMM yy HH:MM")</div>
<div>@datapoint.Value.ToString(@GetFormat(sensorTypeData.SensorTypeName), CultureInfo.CurrentUICulture)@GetUnits(sensorTypeData.SensorTypeName)</div>
</TooltipTemplate>
</RadzenLineSeries>
}
<RadzenLegend Visible="true" />
</RadzenChart>
Any help /pointers appreciated.
Mark