Hi,
I have followed the step by step guide and compared code of the tooltip example on Line chart with code below, but for some reason mine is not working.
Any reason why?
Please see attached image of the working chart but no tooltip.
code below
@using Syncfusion.Blazor.Charts
@code {
[Parameter] public List<Quarterly>ResponsesByQuarter { get; set; }
[Parameter] public string Title { get; set; }
public class Quarterly
{
public int Year { get; set; } = 0;
public int Quarter { get; set; } = 0;
public string YearAndQuarter { get; set; } = "";
public int ResponsePercentage { get; set; } = 0;
public float Q1_Avg_Overall_Satisfaction { get; set; } = 0;
public float Q2_Avg_Interaction_with_Team { get; set; } = 0;
public float Q3_Avg_Deliverables { get; set; } = 0;
public float Q4_Avg_Management_and_Administration { get; set; } = 0;
public float Q5_Avg_Values { get; set; } = 0;
public float Q6_Avg_Problem_Resolution { get; set; } = 0;
}
}
<SfChart Title="@Title" Width="100%" >
<ChartArea><ChartAreaBorder Width="0" /></ChartArea>
<ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category" EdgeLabelPlacement="EdgeLabelPlacement.Shift">
<ChartAxisMajorGridLines Width="0" />
</ChartPrimaryXAxis>
<ChartPrimaryYAxis LabelFormat="{value}" RangePadding="ChartRangePadding.None" Interval="1">
<ChartAxisLineStyle Width="0" />
</ChartPrimaryYAxis>
<ChartTooltipSettings Enable="true" ></ChartTooltipSettings>
<ChartSeriesCollection>
<ChartSeries DataSource="@ResponsesByQuarter" Name="Avg Overall Satisfaction" XName="YearAndQuarter" Opacity="1" Type="ChartSeriesType.Line" YName="Q1_Avg_Overall_Satisfaction" ><ChartMarker Visible="true" /></ChartSeries>
<ChartSeries DataSource="@ResponsesByQuarter" Name="Avg Interaction with Team" XName="YearAndQuarter" Opacity="1" Type="ChartSeriesType.Line" YName="Q2_Avg_Interaction_with_Team" ><ChartMarker Visible="true" /></ChartSeries>
<ChartSeries DataSource="@ResponsesByQuarter" Name="Avg Deliverables" XName="YearAndQuarter" Opacity="1" Type="ChartSeriesType.Line" YName="Q3_Avg_Deliverables" ><ChartMarker Visible="true" /></ChartSeries>
<ChartSeries DataSource="@ResponsesByQuarter" Name="Avg Management and Admin" XName="YearAndQuarter" Opacity="1" Type="ChartSeriesType.Line" YName="Q4_Avg_Management_and_Administration" ><ChartMarker Visible="true" /></ChartSeries>
<ChartSeries DataSource="@ResponsesByQuarter" Name="Avg Values" XName="YearAndQuarter" Opacity="1" Type="ChartSeriesType.Line" YName="Q5_Avg_Values" ><ChartMarker Visible="true" /></ChartSeries>
<ChartSeries DataSource="@ResponsesByQuarter" Name="Avg Problem Resolution" XName="YearAndQuarter" Opacity="1" Type="ChartSeriesType.Line" YName="Q6_Avg_Problem_Resolution" ><ChartMarker Visible="true" /></ChartSeries>
</ChartSeriesCollection>
</SfChart>
Please advise.
Best regards
Andrew
Hi Andrew,
Greetings from Syncfusion.
We request you to include the lodash script reference in your application to overcome the reported problem if you are using older NuGet version.
|
_Host.cshtml <head> <script src=https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min.js></script> <script src=https://cdn.syncfusion.com/blazor/syncfusion-blazor-base.min.js></script> </head> |
In latest version, we have removed this script reference and user interactions will work properly without this reference. Please check with the below documentation link.
UG : https://blazor.syncfusion.com/documentation/chart/getting-started
Kindly revert us if you have any concerns.
Regards,
Durga G.