Hi there!
Having an issue with the Pivot Table control for Blazor.
I'm following the "Pivot Table - Toolbar" demo you guys have, and while I've successfully gotten my Pivot Table to work (Using my own Data) and visually display correctly on the table side, I run into problems when it comes to the Charts portion of the Pivot Table.
Adding the below Line (as seen in the Demo mentioned above), the page no longer Renders, and a juicy error message shows up:
<PivotViewDisplayOption Primary="Primary.Table" View="View.Both"></PivotViewDisplayOption>
I have played around a bit with this, and have come to the Conclusion that the moment I want to use the Charts for the Pivot Table, it breaks.
Setting "View='View.Both'" to "View='View.Table'" works, as well as completely removing the PivotViewDisplayOption works. But the moment I set it to "View='View.Both'" or "View='View.Chart'" it collapses and no longer works.
(Additionally, I have also tried Specifying "Primary='Primary.Chart'" to no avail)
When viewing the Inspection Tool, the below is the error message I receive:
I noticed the AggregateException portion and figured perhaps some of my Data was malformed, so I applied various formatting to the data, as well as tried completely removing some of the Data that I believed could be the problem but still receive the same issue.
(Note: I removed mainly Numeric Fields representing currency values and DateTime fields, as these are the only types I've had formatting issues with in the past)
Regarding the "There is no tracked object with id '9'" error, I did noticed that the ID would change as I removed Toolbar Items from the Toolbar List. But can not sus out the cause.
I'd very much appreciate some assistance or insight as to possible causes for these errors?
While I can manually build the charts separately from the Pivot Table I'd like to avoid that where possible.
My Pivot Table:
<SfPivotView TValue="PastelIncomeCreditModel" Width="95%" Height="80%" ShowTooltip="true" AllowDrillThrough="true" ShowFieldList="true" ShowToolbar="true" Toolbar="@PivotToolbar" AllowNumberFormatting="true" AllowConditionalFormatting="true" AllowPdfExport="true" AllowExcelExport="true" EnableValueSorting="true">
<PivotViewDisplayOption Primary="Primary.Table" View="View.Both"></PivotViewDisplayOption>
<PivotViewDataSourceSettings DataSource="@Data" ExpandAll="false" EnableSorting="true">
<PivotViewColumns>
<PivotViewColumn Name="InvoiceDate"></PivotViewColumn>
</PivotViewColumns>
<PivotViewRows>
<PivotViewRow Name="AreaCode"></PivotViewRow>
<PivotViewRow Name="ClientName"></PivotViewRow>
</PivotViewRows>
<PivotViewValues>
<PivotViewValue Name="SalesTotalEXCL" Caption="Sales"></PivotViewValue>
<PivotViewValue Name="CreditTotalEXCL" Caption="Credit"></PivotViewValue>
<PivotViewValue Name="CalculatedTotalEXCL" Caption="Difference"></PivotViewValue>
</PivotViewValues>
<PivotViewFormatSettings>
<PivotViewFormatSetting Name="SalesTotalEXCL" Format="C2" UseGrouping=true></PivotViewFormatSetting>
<PivotViewFormatSetting Name="CreditTotalEXCL" Format="C2" UseGrouping=true></PivotViewFormatSetting>
<PivotViewFormatSetting Name="CalculatedTotalEXCL" Format="C2" UseGrouping=true></PivotViewFormatSetting>
</PivotViewFormatSettings>
<PivotViewGroupSettings>
<PivotViewGroupSetting Name="InvoiceDate" Type="GroupType.Date" GroupInterval="new List<DateGroup> { DateGroup.Years, DateGroup.Months, DateGroup.Days }"></PivotViewGroupSetting>
</PivotViewGroupSettings>
</PivotViewDataSourceSettings>
<PivotChartSettings Title="Income/Expenses">
<PivotChartSeries Type="Syncfusion.Blazor.PivotView.ChartSeriesType.Line"></PivotChartSeries>
<PivotChartPrimaryYAxis>
<PivotChartPrimaryYAxisBorder Width="0"></PivotChartPrimaryYAxisBorder>
</PivotChartPrimaryYAxis>
</PivotChartSettings>
<PivotViewGridSettings ColumnWidth="100"></PivotViewGridSettings>
</SfPivotView>
Breakdown of the Model Structure:
public class PastelIncomeCreditModel
{
public long ID { get; set; }
public long? InvoiceID { get; set; }
public string AreaCode { get; set; }
public string AreaDescription { get; set; }
public string InvoiceDescription { get; set; }
public string ClientName { get; set; }
public string ClientContactName { get; set; }
public string ClientContactEmail { get; set; }
public string ClientContactNumber { get; set; }
public DateTime? InvoiceDate { get; set; }
public DateTime? OrderDate { get; set; }
public DateTime? DueDate { get; set; }
public DateTime? DeliveryDate { get; set; }
public double? InvoiceTotalEXCL { get; set; }
public int? InvoiceType { get; set; }
public double? SalesTotalEXCL { get; set; }
public double? CreditTotalEXCL { get; set; }
public double? CalculatedTotalEXCL { get; set; }
public string Type { get; set; }
}
Your assistance is greatly appreciated!
Just to Note: Specifying the Chart as above, or not does not change the error.
<PivotChartSettings Title="Income/Expenses">
<PivotChartSeries Type="Syncfusion.Blazor.PivotView.ChartSeriesType.Line"></PivotChartSeries>
<PivotChartPrimaryYAxis>
<PivotChartPrimaryYAxisBorder Width="0"></PivotChartPrimaryYAxisBorder>
</PivotChartPrimaryYAxis>
</PivotChartSettings>
Hi Evendyce,
We are unable to reproduce the reported problem at our end. For your reference, we have attached a video and sample link that we tested.
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BLAZOR~11383956409
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PivotTesting-1310810909
If the problem persists, please reproduce it in the provided sample and revert to us (or) send your sample that replicates the problem. This would allow us to investigate the reported problem at our end and provide a solution as soon as possible.
Regards,
Angelin Faith Sheeba.
Hi sorry for late feedback.
I resolved the issue.
My problem was related to the Width and Height properties of the Pivot Table.
<SfPivotViewTValue="PastelIncomeCreditModel"Width="95%"Height="80%"ShowTooltip="true"AllowDrillThrough="true"ShowFieldList="true"ShowToolbar="true"Toolbar="@PivotToolbar"AllowNumberFormatting="true"AllowConditionalFormatting="true"AllowPdfExport="true"AllowExcelExport="true"EnableValueSorting="true">
It appears that the Charts have issues translating a Percentage value to the double value it's expecting for resizing the charts. So for the time being, I've removed the Percentages and instead threw a container around the Control to use for the Control sizing.
Hi Evendyce,
Please let us know if you have any other queries. We are always happy to assist you.
Regards,
Angelin Faith Sheeba.