Search results

Toolbar in ASP.NET Core Pivot Table control

02 Aug 2021 / 7 minutes to read

Toolbar option allows to access the frequently used features like switching between pivot table and pivot chart, changing chart types, conditional formatting, exporting, etc… with ease at runtime. This option can be enabled by setting the showToolbar property in ejs-pivotview tag to true. The toolbar property in ejs-pivotview tag accepts the collection of built-in toolbar options.

Built-in Toolbar Options

The following table shows built-in toolbar options and its actions.

Built-in Toolbar Options Actions
New Creates a new report
Save Saves the current report
Save As Save as current report
Rename Renames the current report
Delete Deletes the current report
Load Loads any report from the report list
Grid Shows pivot table
Chart Shows a chart in any type from the built-in list and option to enable/disable multiple axes
Exporting Exports the pivot table as PDF/Excel/CSV and the pivot chart as PDF and image
Sub-total Shows or hides sub totals
Grand Total Shows or hides grand totals
Conditional Formatting Shows the conditional formatting pop-up to apply formatting
Number Formatting Shows the number formatting pop-up to apply number formatting
Field List Shows the fieldlist pop-up
MDX Shows the MDX query that was run to retrieve data from the OLAP data source. NOTE: This applies only to the OLAP data source.

The order of toolbar options can be changed by simply moving the position of items in the ToolbarItems collection. Also if end user wants to remove any toolbar option from getting displayed, it can be simply ignored from adding into the ToolbarItems collection.

tagHelper
Toolbar.cs
Copied to clipboard
<ejs-pivotview id="pivotview" allowExcelExport="true" allowNumberFormatting="true" allowConditionalFormatting="true" allowPdfExport="true" showToolbar="true" allowCalculatedField="true" showFieldList="true" width="100%" height="300" toolbar="@(new List<string>() {"New", "Save", "SaveAs", "Rename", "Remove", "Load",
"Grid", "Chart", "Export", "SubTotal", "GrandTotal", "ConditionalFormatting", "NumberFormatting", "FieldList" })" saveReport="saveReport" loadReport="loadReport" fetchReport="fetchReport" renameReport="renameReport" removeReport="removeReport" newReport="newReport">
    <e-datasourcesettings dataSource="@ViewBag.DataSource" expandAll="false" enableSorting="true">
        <e-formatsettings>
            <e-field name="Amount" format="C0" maximumSignificantDigits="10" minimumSignificantDigits="1" useGrouping="true"></e-field>
        </e-formatsettings>
        <e-rows>
            <e-field name="Country"></e-field>
            <e-field name="Products"></e-field>
        </e-rows>
        <e-columns>
            <e-field name="Year"></e-field>
            <e-field name="Quarter"></e-field>
        </e-columns>
        <e-values>
            <e-field name="Sold" caption="Units Sold"></e-field>
            <e-field name="Amount" caption="Sold Amount"></e-field>
        </e-values>
    </e-datasourcesettings>
    <e-gridSettings columnWidth="140"></e-gridSettings>
    <e-displayOption view="Both"></e-displayOption>
</ejs-pivotview>
<style>
    #pivotview {
        width: 100%;
        height: 100%;
    }

    .e-tool-expand::before {
        content: '\e702';
    }
</style>
<script>

    function saveReport(args) {
        var reports = [];
        var isSaved = false;
        if (localStorage.pivotviewReports && localStorage.pivotviewReports !== "") {
            reports = JSON.parse(localStorage.pivotviewReports);
        }
        if (args.report && args.reportName && args.reportName !== '') {
            reports.map(function (item) {
                if (args.reportName === item.reportName) {
                    item.report = args.report;
                    isSaved = true;
                }
            });
            if (!isSaved) {
                reports.push(args);
            }
            localStorage.pivotviewReports = JSON.stringify(reports);
        }
    }
    function fetchReport(args) {
        var reportCollection = [];
        var reeportList = [];
        if (localStorage.pivotviewReports && localStorage.pivotviewReports !== "") {
            reportCollection = JSON.parse(localStorage.pivotviewReports);
        }
        reportCollection.map(function (item) {
            reeportList.push(item.reportName);
        });
        args.reportName = reeportList;
    }
    function loadReport(args) {
        var pivotObj = document.getElementById('pivotview').ej2_instances[0];
        var reportCollection = [];
        if (localStorage.pivotviewReports && localStorage.pivotviewReports !== "") {
            reportCollection = JSON.parse(localStorage.pivotviewReports);
        }
        reportCollection.map(function (item) {
            if (args.reportName === item.reportName) {
                args.report = item.report;
            }
        });
        if (args.report) {
            pivotObj.dataSourceSettings = JSON.parse(args.report).dataSourceSettings;
        }
    }
    function removeReport(args) {
        var reportCollection = [];
        if (localStorage.pivotviewReports && localStorage.pivotviewReports !== "") {
            reportCollection = JSON.parse(localStorage.pivotviewReports);
        }
        for (var i = 0; i < reportCollection.length; i++) {
            if (reportCollection[i].reportName === args.reportName) {
                reportCollection.splice(i, 1);
            }
        }
        if (localStorage.pivotviewReports && localStorage.pivotviewReports !== "") {
            localStorage.pivotviewReports = JSON.stringify(reportCollection);
        }
    }
    function renameReport(args) {
        var reportCollection = [];
        if (localStorage.pivotviewReports && localStorage.pivotviewReports !== "") {
            reportCollection = JSON.parse(localStorage.pivotviewReports);
        }
        reportCollection.map(function (item) {
            if (args.reportName === item.reportName) {
                item.reportName = args.rename;
            }
        });
        if (localStorage.pivotviewReports && localStorage.pivotviewReports !== "") {
            localStorage.pivotviewReports = JSON.stringify(reportCollection);
        }
    }
    function newReport() {
        var pivotObj = document.getElementById('pivotview').ej2_instances[0];
        pivotObj.setProperties({
            dataSourceSettings: {
                columns: [],
                rows: [],
                values: [],
                filters: []
            }
        }, false);
    }
</script>
Copied to clipboard
public ActionResult Index()
{
    var data = GetPivotData();
    ViewBag.DataSource = data;
    return View();
}

public List<PivotData> GetPivotData()
{
    List<PivotData> pivotData = new List<PivotData>();
    pivotData.Add(new PivotData { Sold = 31, Amount = 52824, Country = "France", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 51, Amount = 86904, Country = "France", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 90, Amount = 153360, Country = "France", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 25, Amount = 42600, Country = "France", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 27, Amount = 46008, Country = "France", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 49, Amount = 83496, Country = "France", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 95, Amount = 161880, Country = "France", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 67, Amount = 114168, Country = "France", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 75, Amount = 127800, Country = "France", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 67, Amount = 114168, Country = "France", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 69, Amount = 117576, Country = "France", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 90, Amount = 153360, Country = "France", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 27264, Country = "France", Products = "Mountain Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 83, Amount = 124422, Country = "France", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 57, Amount = 85448, Country = "France", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 20, Amount = 29985, Country = "France", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 93, Amount = 139412, Country = "France", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 35, Amount = 52470, Country = "France", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 28, Amount = 41977, Country = "France", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 48, Amount = 71957, Country = "France", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 36, Amount = 53969, Country = "France", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 25, Amount = 37480, Country = "France", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 69, Amount = 103436, Country = "France", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 23989, Country = "France", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 28, Amount = 41977, Country = "France", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 19, Amount = 28486, Country = "France", Products = "Road Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 89, Amount = 141999.5, Country = "France", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 91, Amount = 145190.5, Country = "France", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 24, Amount = 38292, Country = "France", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 75, Amount = 119662.5, Country = "France", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 100, Amount = 159550, Country = "France", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 30, Amount = 47865, Country = "France", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 69, Amount = 110089.5, Country = "France", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 25, Amount = 39887.5, Country = "France", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 42, Amount = 67011, Country = "France", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 94, Amount = 149977, Country = "France", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 76, Amount = 121258, Country = "France", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 52, Amount = 82966, Country = "France", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 33, Amount = 52651.5, Country = "France", Products = "Touring Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 23989, Country = "Germany", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 21, Amount = 33505.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 74, Amount = 126096, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 99, Amount = 148406, Country = "Germany", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 31, Amount = 49460.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 57, Amount = 97128, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 41, Amount = 61464, Country = "Germany", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 64, Amount = 102112, Country = "Germany", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 85, Amount = 144840, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 76, Amount = 129504, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 33, Amount = 56232, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 71, Amount = 120984, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 81, Amount = 138024, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 65, Amount = 110760, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 39, Amount = 66456, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 91, Amount = 155064, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 27264, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 59, Amount = 100536, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 36, Amount = 61344, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 39, Amount = 58466, Country = "Germany", Products = "Road Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 47, Amount = 70458, Country = "Germany", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 19, Amount = 28486, Country = "Germany", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 34, Amount = 50971, Country = "Germany", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 34, Amount = 50971, Country = "Germany", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 26, Amount = 38979, Country = "Germany", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 15, Amount = 22490, Country = "Germany", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 83, Amount = 124422, Country = "Germany", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 79, Amount = 118426, Country = "Germany", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 14, Amount = 20991, Country = "Germany", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 15, Amount = 23932.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 47, Amount = 74988.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 93, Amount = 148381.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 13, Amount = 20741.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 44, Amount = 70202, Country = "Germany", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 59, Amount = 94134.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 34, Amount = 54247, Country = "Germany", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 48, Amount = 76584, Country = "Germany", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 35, Amount = 55842.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 71, Amount = 113280.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 77, Amount = 131208, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 92, Amount = 156768, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 51, Amount = 86904, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 91, Amount = 155064, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 90, Amount = 153360, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 56, Amount = 95424, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 14, Amount = 23856, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 95, Amount = 161880, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 24, Amount = 40896, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 39, Amount = 66456, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 84, Amount = 143136, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 40, Amount = 68160, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 96, Amount = 163584, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 24, Amount = 35981, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 86, Amount = 128919, Country = "United States", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 31, Amount = 46474, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 36, Amount = 53969, Country = "United States", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 40, Amount = 59965, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 69, Amount = 103436, Country = "United States", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 95, Amount = 142410, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 95, Amount = 142410, Country = "United States", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 30, Amount = 44975, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 11, Amount = 16494, Country = "United States", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 97, Amount = 145408, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 23989, Country = "United States", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 40, Amount = 59965, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 68, Amount = 101937, Country = "United States", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 11, Amount = 16494, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 27, Amount = 40478, Country = "United States", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 45, Amount = 67460, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 100, Amount = 149905, Country = "United States", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 70, Amount = 104935, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 83, Amount = 124422, Country = "United States", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 100, Amount = 149905, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 18, Amount = 26987, Country = "United States", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 70, Amount = 104935, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 81, Amount = 121424, Country = "United States", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 20, Amount = 29985, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 99, Amount = 148406, Country = "United States", Products = "Road Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 43, Amount = 73272, Country = "United States", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 43, Amount = 73272, Country = "United States", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 52, Amount = 88608, Country = "United States", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 91, Amount = 155064, Country = "United States", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 37, Amount = 63048, Country = "United States", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 41, Amount = 69864, Country = "United States", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 49, Amount = 83496, Country = "United States", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 23, Amount = 39192, Country = "United States", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 67, Amount = 114168, Country = "United States", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 85, Amount = 144840, Country = "United States", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 25, Amount = 42600, Country = "United States", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 28, Amount = 47712, Country = "United States", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 53, Amount = 90312, Country = "United States", Products = "Mountain Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 82, Amount = 130831, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 41, Amount = 65415.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 60, Amount = 95730, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 71, Amount = 113280.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 45, Amount = 71797.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 21, Amount = 33505.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 94, Amount = 149977, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 34, Amount = 54247, Country = "United States", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 14, Amount = 22337, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 76, Amount = 121258, Country = "United States", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 50, Amount = 79775, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 75, Amount = 119662.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 49, Amount = 78179.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 40, Amount = 63820, Country = "United States", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 94, Amount = 149977, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 17, Amount = 27123.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 45, Amount = 71797.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 56, Amount = 89348, Country = "United States", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 75, Amount = 119662.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 11, Amount = 17550.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 54, Amount = 86157, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 14, Amount = 22337, Country = "United States", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 11, Amount = 17550.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 76, Amount = 121258, Country = "United States", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 45, Amount = 71797.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 80, Amount = 127640, Country = "United States", Products = "Touring Bikes", Year = "FY 2018", Quarter = "Q1" });
    return pivotData;
}

public class PivotData
{
    public int Sold { get; set; }
    public double Amount { get; set; }
    public string Country { get; set; }
    public string Products { get; set; }
    public string Year { get; set; }
    public string Quarter { get; set; }
}

output

Show desired chart types in the dropdown menu

By default, all chart types are displayed in the dropdown menu included in the toolbar. However, based on the request for an application, we may need to show selective chart types on our own. This can be achieved using the chartTypes property. To know more about supporting chart types, click here.

tagHelper
Toolbar.cs
Copied to clipboard
<ejs-pivotview id="pivotview" width="100%" height="300" toolbar="@(new List<string>() {
  "Grid", "Chart" })" chartTypes="@(new List<string>(){"Column", "Bar", "Line", "Area"})">
    <e-datasourcesettings dataSource="@ViewBag.DataSource" enableSorting="true">
        <e-formatsettings>
            <e-field name="Amount" format="C0" maximumSignificantDigits="10" minimumSignificantDigits="1" useGrouping="true"></e-field>
        </e-formatsettings>
        <e-rows>
            <e-field name="Country"></e-field>
            <e-field name="Products"></e-field>
        </e-rows>
        <e-columns>
            <e-field name="Year"></e-field>
            <e-field name="Quarter"></e-field>
        </e-columns>
        <e-values>
            <e-field name="Sold" caption="Units Sold"></e-field>
            <e-field name="Amount" caption="Sold Amount"></e-field>
        </e-values>
    </e-datasourcesettings>
    <e-displayOption view="Both"></e-displayOption>
</ejs-pivotview>
<style>
    #pivotview {
        width: 100%;
        height: 100%;
    }

    .e-tool-expand::before {
        content: '\e702';
    }
</style>
Copied to clipboard
public ActionResult Index()
{
    var data = GetPivotData();
    ViewBag.DataSource = data;
    return View();
}

public List<PivotData> GetPivotData()
{
    List<PivotData> pivotData = new List<PivotData>();
    pivotData.Add(new PivotData { Sold = 31, Amount = 52824, Country = "France", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 51, Amount = 86904, Country = "France", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 90, Amount = 153360, Country = "France", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 25, Amount = 42600, Country = "France", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 27, Amount = 46008, Country = "France", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 49, Amount = 83496, Country = "France", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 95, Amount = 161880, Country = "France", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 67, Amount = 114168, Country = "France", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 75, Amount = 127800, Country = "France", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 67, Amount = 114168, Country = "France", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 69, Amount = 117576, Country = "France", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 90, Amount = 153360, Country = "France", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 27264, Country = "France", Products = "Mountain Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 83, Amount = 124422, Country = "France", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 57, Amount = 85448, Country = "France", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 20, Amount = 29985, Country = "France", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 93, Amount = 139412, Country = "France", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 35, Amount = 52470, Country = "France", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 28, Amount = 41977, Country = "France", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 48, Amount = 71957, Country = "France", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 36, Amount = 53969, Country = "France", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 25, Amount = 37480, Country = "France", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 69, Amount = 103436, Country = "France", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 23989, Country = "France", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 28, Amount = 41977, Country = "France", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 19, Amount = 28486, Country = "France", Products = "Road Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 89, Amount = 141999.5, Country = "France", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 91, Amount = 145190.5, Country = "France", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 24, Amount = 38292, Country = "France", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 75, Amount = 119662.5, Country = "France", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 100, Amount = 159550, Country = "France", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 30, Amount = 47865, Country = "France", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 69, Amount = 110089.5, Country = "France", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 25, Amount = 39887.5, Country = "France", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 42, Amount = 67011, Country = "France", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 94, Amount = 149977, Country = "France", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 76, Amount = 121258, Country = "France", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 52, Amount = 82966, Country = "France", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 33, Amount = 52651.5, Country = "France", Products = "Touring Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 23989, Country = "Germany", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 21, Amount = 33505.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 74, Amount = 126096, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 99, Amount = 148406, Country = "Germany", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 31, Amount = 49460.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 57, Amount = 97128, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 41, Amount = 61464, Country = "Germany", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 64, Amount = 102112, Country = "Germany", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 85, Amount = 144840, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 76, Amount = 129504, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 33, Amount = 56232, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 71, Amount = 120984, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 81, Amount = 138024, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 65, Amount = 110760, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 39, Amount = 66456, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 91, Amount = 155064, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 27264, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 59, Amount = 100536, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 36, Amount = 61344, Country = "Germany", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 39, Amount = 58466, Country = "Germany", Products = "Road Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 47, Amount = 70458, Country = "Germany", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 19, Amount = 28486, Country = "Germany", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 34, Amount = 50971, Country = "Germany", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 34, Amount = 50971, Country = "Germany", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 26, Amount = 38979, Country = "Germany", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 15, Amount = 22490, Country = "Germany", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 83, Amount = 124422, Country = "Germany", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 79, Amount = 118426, Country = "Germany", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 14, Amount = 20991, Country = "Germany", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 15, Amount = 23932.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 47, Amount = 74988.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 93, Amount = 148381.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 13, Amount = 20741.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 44, Amount = 70202, Country = "Germany", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 59, Amount = 94134.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 34, Amount = 54247, Country = "Germany", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 48, Amount = 76584, Country = "Germany", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 35, Amount = 55842.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 71, Amount = 113280.5, Country = "Germany", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 77, Amount = 131208, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 92, Amount = 156768, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 51, Amount = 86904, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 91, Amount = 155064, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 90, Amount = 153360, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 56, Amount = 95424, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 14, Amount = 23856, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 95, Amount = 161880, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 24, Amount = 40896, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 39, Amount = 66456, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 84, Amount = 143136, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 40, Amount = 68160, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 96, Amount = 163584, Country = "United Kingdom", Products = "Mountain Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 24, Amount = 35981, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 86, Amount = 128919, Country = "United States", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 31, Amount = 46474, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 36, Amount = 53969, Country = "United States", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 40, Amount = 59965, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 69, Amount = 103436, Country = "United States", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 95, Amount = 142410, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 95, Amount = 142410, Country = "United States", Products = "Road Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 30, Amount = 44975, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 11, Amount = 16494, Country = "United States", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 97, Amount = 145408, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 16, Amount = 23989, Country = "United States", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 40, Amount = 59965, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 68, Amount = 101937, Country = "United States", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 11, Amount = 16494, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 27, Amount = 40478, Country = "United States", Products = "Road Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 45, Amount = 67460, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 100, Amount = 149905, Country = "United States", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 70, Amount = 104935, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 83, Amount = 124422, Country = "United States", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 100, Amount = 149905, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 18, Amount = 26987, Country = "United States", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 70, Amount = 104935, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 81, Amount = 121424, Country = "United States", Products = "Road Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 20, Amount = 29985, Country = "United Kingdom", Products = "Road Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 99, Amount = 148406, Country = "United States", Products = "Road Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 43, Amount = 73272, Country = "United States", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 43, Amount = 73272, Country = "United States", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 52, Amount = 88608, Country = "United States", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 91, Amount = 155064, Country = "United States", Products = "Mountain Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 37, Amount = 63048, Country = "United States", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 41, Amount = 69864, Country = "United States", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 49, Amount = 83496, Country = "United States", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 23, Amount = 39192, Country = "United States", Products = "Mountain Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 67, Amount = 114168, Country = "United States", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 85, Amount = 144840, Country = "United States", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 25, Amount = 42600, Country = "United States", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 28, Amount = 47712, Country = "United States", Products = "Mountain Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 53, Amount = 90312, Country = "United States", Products = "Mountain Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 82, Amount = 130831, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 41, Amount = 65415.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 60, Amount = 95730, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 71, Amount = 113280.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 45, Amount = 71797.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 21, Amount = 33505.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 94, Amount = 149977, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 34, Amount = 54247, Country = "United States", Products = "Touring Bikes", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 14, Amount = 22337, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 76, Amount = 121258, Country = "United States", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 50, Amount = 79775, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 75, Amount = 119662.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 49, Amount = 78179.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 40, Amount = 63820, Country = "United States", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 94, Amount = 149977, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 17, Amount = 27123.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 45, Amount = 71797.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 56, Amount = 89348, Country = "United States", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 75, Amount = 119662.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 11, Amount = 17550.5, Country = "United States", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { Sold = 54, Amount = 86157, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 14, Amount = 22337, Country = "United States", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { Sold = 11, Amount = 17550.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 76, Amount = 121258, Country = "United States", Products = "Touring Bikes", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { Sold = 45, Amount = 71797.5, Country = "United Kingdom", Products = "Touring Bikes", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { Sold = 80, Amount = 127640, Country = "United States", Products = "Touring Bikes", Year = "FY 2018", Quarter = "Q1" });
    return pivotData;
}

public class PivotData
{
    public int Sold { get; set; }
    public double Amount { get; set; }
    public string Country { get; set; }
    public string Products { get; set; }
    public string Year { get; set; }
    public string Quarter { get; set; }
}

output

Switch the chart to multiple axes

In the chart, the user can switch from single axis to multiple axes with the help of the built-in checkbox available inside the chart type dropdown menu in the toolbar. For more information refer here.

output

There are two modes available in Multiple Axis option: Stacked and Single. The modes can be changed using “Multiple Axis Mode” drop-down list which appears while clicking the More… option.

output

Show or hide legend

In the chart, legend can be shown or hidden dynamically with the help of the built-in option available in the chart type drop-down menu.

By default, the legend is not be visible for the accumulation chart types like pie, doughnut, pyramid, and funnel. Users can enable or disable using the built-in checkbox option.

output

Adding custom option to the toolbar

In addition to the existing built-in toolbar items, new toolbar item(s) may also be included. This can be achieved by using the toolbarRender event. The action of the new toolbar item(s) can also be defined within this event.

The new toolbar item(s) can be added to the desired position in the toolbar using the splice option.

tagHelper
ToolbarCustomize.cs
Copied to clipboard
<ejs-pivotview id="pivotview" showToolbar="true"  width="100%" height="300" toolbar="@(new List<string>() {"Expand/Collapse" })" toolbarRender="beforeToolbarRender">
    <e-datasourcesettings dataSource="@ViewBag.DataSource" enableSorting="true">
        <e-formatsettings>
            <e-field name="Amount" format="C0" maximumSignificantDigits="10" minimumSignificantDigits="1" useGrouping="true"></e-field>
        </e-formatsettings>
        <e-rows>
            <e-field name="Country"></e-field>
            <e-field name="Products"></e-field>
        </e-rows>
        <e-columns>
            <e-field name="Year"></e-field>
            <e-field name="Order_Source" caption="Order Source"></e-field>
        </e-columns>
        <e-values>
            <e-field name="In_Stock" caption="In Stock"></e-field>
            <e-field name="Sold" caption="Units Sold"></e-field>
            <e-field name="Amount" caption="Sold Amount"></e-field>
        </e-values>
        <e-filters>
            <e-field name="Product_Categories" caption="Product Categories"></e-field>
        </e-filters>
    </e-datasourcesettings>
    <e-gridSettings columnWidth="140"></e-gridSettings>
    <e-displayOption view="Both"></e-displayOption>
</ejs-pivotview>
<style>
    #pivotview {
        width: 100%;
        height: 100%;
    }

    .e-tool-expand::before {
        content: '\e702';
    }
</style>
<script>
    function beforeToolbarRender(args) {
        args.customToolbar.splice(12, 0, {
                prefixIcon: 'e-tool-expand e-icons', tooltipText: 'Expand/Collapse',
                click: function (args: ClickEventArgs) {
                    var pivotTableObj = document.getElementById('pivotview').ej2_instances[0];
                    pivotTableObj.dataSourceSettings.expandAll = !pivotTableObj.dataSourceSettings.expandAll;
                },
        });
    }
</script>
Copied to clipboard
public ActionResult Index()
{
    var data = GetPivotData();
    ViewBag.DataSource = data;
    return View();
}

public List<PivotData> GetPivotData()
{
    List<PivotData> pivotData = new List<PivotData>();
    pivotData.Add(new PivotData { In_Stock = 34, Sold = 51, Amount = 383, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 4, Sold = 423, Amount = 3595.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 38, Sold = 234, Amount = 1813.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 42, Sold = 127, Amount = 952.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 36, Sold = 89, Amount = 668, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 17, Sold = 340, Amount = 2890, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 22, Sold = 379, Amount = 2937.25, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 12, Sold = 269, Amount = 2017.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 28, Sold = 15, Amount = 113, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 46, Sold = 369, Amount = 3136.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 410, Amount = 3177.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 18, Sold = 99, Amount = 742.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 50, Sold = 50, Amount = 375.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 31, Sold = 129, Amount = 1096.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 23, Sold = 404, Amount = 3131, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 42, Sold = 132, Amount = 990, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 42, Sold = 56, Amount = 420.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 45, Sold = 481, Amount = 4088.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 3, Sold = 71, Amount = 550.25, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 35, Sold = 455, Amount = 3412.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 44, Sold = 25, Amount = 188, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 6, Sold = 466, Amount = 3961, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 47, Sold = 198, Amount = 1534.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 15, Sold = 421, Amount = 3157.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 18, Sold = 10, Amount = 75.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 6, Sold = 348, Amount = 2958, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 46, Sold = 118, Amount = 914.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 37, Sold = 207, Amount = 1552.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 17, Sold = 45, Amount = 338, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 39, Sold = 97, Amount = 824.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 3, Sold = 271, Amount = 2100.25, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 23, Sold = 501, Amount = 3757.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 42, Sold = 63, Amount = 473, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 36, Sold = 456, Amount = 3876, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 44, Sold = 155, Amount = 1201.25, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 12, Sold = 140, Amount = 1050, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 9, Sold = 31, Amount = 233, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 49, Sold = 402, Amount = 3417, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 30, Sold = 254, Amount = 1968.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 28, Sold = 314, Amount = 2355, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 43, Sold = 91, Amount = 683, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 44, Sold = 202, Amount = 1717, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 11, Sold = 298, Amount = 2309.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 39, Sold = 166, Amount = 1245, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 7, Sold = 11, Amount = 83, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 33, Sold = 416, Amount = 3536, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 39, Sold = 55, Amount = 426.25, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 510, Amount = 3825, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 4, Sold = 199, Amount = 1691.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Sales Person", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 4, Sold = 103, Amount = 798.25, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "Teleshopping", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 42, Sold = 227, Amount = 1702.5, Country = "France", Product_Categories = "Accessories", Products ="Bottles and Cages", Order_Source = "App Store", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 36, Sold = 16, Amount = 72, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 18, Sold = 250, Amount = 1250, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 19, Sold = 386, Amount = 1640.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 40, Sold = 165, Amount = 660, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 45, Sold = 83, Amount = 373.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 11, Sold = 221, Amount = 1105, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 17, Sold = 249, Amount = 1058.25, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 50, Sold = 418, Amount = 1672, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 34, Sold = 55, Amount = 247.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 3, Sold = 415, Amount = 2075, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 42, Sold = 57, Amount = 242.25, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 5, Sold = 252, Amount = 1008, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 11, Sold = 19, Amount = 85.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 10, Sold = 64, Amount = 320, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 42, Sold = 66, Amount = 280.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 33, Sold = 263, Amount = 1052, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 41, Sold = 61, Amount = 274.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 33, Sold = 257, Amount = 1285, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 386, Amount = 1640.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 10, Sold = 503, Amount = 2012, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 7, Sold = 43, Amount = 193.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 30, Sold = 322, Amount = 1610, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 40, Sold = 305, Amount = 1296.25, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 46, Sold = 171, Amount = 684, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 8, Sold = 22, Amount = 99, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 18, Sold = 254, Amount = 1270, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 19, Sold = 72, Amount = 306, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 37, Sold = 286, Amount = 1144, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 15, Sold = 95, Amount = 427.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 48, Sold = 271, Amount = 1355, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 7, Sold = 67, Amount = 284.75, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 92, Amount = 368, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 18, Sold = 86, Amount = 387, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 15, Sold = 320, Amount = 1600, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 5, Sold = 244, Amount = 1037, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 45, Sold = 403, Amount = 1612, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 3, Sold = 45, Amount = 202.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 41, Sold = 323, Amount = 1615, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 11, Sold = 256, Amount = 1088, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 24, Sold = 361, Amount = 1444, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 47, Sold = 57, Amount = 256.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 2, Sold = 269, Amount = 1345, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 45, Sold = 448, Amount = 1904, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 10, Sold = 376, Amount = 1504, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 41, Sold = 15, Amount = 67.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 12, Sold = 157, Amount = 785, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 35, Sold = 170, Amount = 722.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 32, Sold = 542, Amount = 2168, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 13, Sold = 96, Amount = 432, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Retail Outlets", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 41, Sold = 212, Amount = 1060, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Sales Person", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 5, Sold = 342, Amount = 1453.5, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "Teleshopping", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 40, Sold = 84, Amount = 336, Country = "France", Product_Categories = "Accessories", Products ="Cleaners", Order_Source = "App Store", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 20, Sold = 42, Amount = 483, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 15, Sold = 287, Amount = 3444, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 14, Sold = 371, Amount = 4173.75, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 48, Sold = 414, Amount = 4554, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 43, Sold = 14, Amount = 161, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 20, Sold = 81, Amount = 972, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 48, Sold = 438, Amount = 4927.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 32, Sold = 507, Amount = 5577, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 45, Sold = 65, Amount = 747.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 41, Sold = 382, Amount = 4584, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 31, Sold = 322, Amount = 3622.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 6, Sold = 313, Amount = 3443, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 20, Sold = 48, Amount = 552, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 29, Sold = 345, Amount = 4140, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 15, Sold = 77, Amount = 866.25, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 32, Sold = 339, Amount = 3729, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 1, Sold = 21, Amount = 241.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 29, Sold = 355, Amount = 4260, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 48, Sold = 76, Amount = 855, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 180, Amount = 1980, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 15, Sold = 44, Amount = 506, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 36, Sold = 453, Amount = 5436, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 33, Sold = 410, Amount = 4612.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 3, Sold = 163, Amount = 1793, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 36, Sold = 77, Amount = 885.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 9, Sold = 489, Amount = 5868, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 4, Sold = 265, Amount = 2981.25, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 33, Sold = 360, Amount = 3960, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 47, Amount = 540.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 24, Sold = 201, Amount = 2412, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 41, Sold = 383, Amount = 4308.75, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 33, Sold = 83, Amount = 913, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 14, Sold = 24, Amount = 276, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 2, Sold = 141, Amount = 1692, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 30, Sold = 332, Amount = 3735, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 50, Sold = 253, Amount = 2783, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 34, Sold = 31, Amount = 356.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 37, Sold = 352, Amount = 4224, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 31, Sold = 443, Amount = 4983.75, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 50, Sold = 185, Amount = 2035, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 20, Sold = 17, Amount = 195.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 49, Sold = 165, Amount = 1980, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 27, Sold = 466, Amount = 5242.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 17, Sold = 512, Amount = 5632, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 29, Sold = 42, Amount = 483, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 29, Sold = 102, Amount = 1224, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 14, Sold = 133, Amount = 1496.25, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 36, Sold = 391, Amount = 4301, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2017", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 29, Sold = 20, Amount = 230, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Retail Outlets", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 42, Sold = 145, Amount = 1740, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Sales Person", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 398, Amount = 4477.5, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "Teleshopping", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 2, Sold = 472, Amount = 5192, Country = "France", Product_Categories = "Accessories", Products ="Fenders", Order_Source = "App Store", Year = "FY 2018", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 24, Sold = 32, Amount = 504.96, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 40, Sold = 258, Amount = 4200.24, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 26, Sold = 442, Amount = 6864.26, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 3, Sold = 317, Amount = 4843.76, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 2, Sold = 32, Amount = 504.96, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 133, Amount = 2165.24, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 40, Sold = 117, Amount = 1817.01, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 37, Sold = 129, Amount = 1971.12, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 45, Sold = 80, Amount = 1262.4, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 36, Sold = 139, Amount = 2262.92, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 18, Sold = 234, Amount = 3634.02, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 38, Sold = 444, Amount = 6784.32, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 36, Sold = 60, Amount = 946.8, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Retail Outlets", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 15, Sold = 470, Amount = 7651.6, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Sales Person", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 27, Sold = 448, Amount = 6957.44, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Teleshopping", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 17, Sold = 118, Amount = 1803.04, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "App Store", Year = "FY 2015", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 7, Sold = 15, Amount = 236.7, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 45, Sold = 95, Amount = 1546.6, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 35, Sold = 191, Amount = 2966.23, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 16, Sold = 426, Amount = 6509.28, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q1" });
    pivotData.Add(new PivotData { In_Stock = 35, Sold = 78, Amount = 1230.84, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 3, Sold = 69, Amount = 1123.32, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 31, Sold = 221, Amount = 3432.13, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 13, Sold = 285, Amount = 4354.8, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q2" });
    pivotData.Add(new PivotData { In_Stock = 26, Sold = 56, Amount = 883.68, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 17, Sold = 303, Amount = 4932.84, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 34, Sold = 419, Amount = 6507.07, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Teleshopping", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 26, Sold = 397, Amount = 6066.16, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "App Store", Year = "FY 2016", Quarter = "Q3" });
    pivotData.Add(new PivotData { In_Stock = 14, Sold = 90, Amount = 1420.2, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Retail Outlets", Year = "FY 2016", Quarter = "Q4" });
    pivotData.Add(new PivotData { In_Stock = 7, Sold = 337, Amount = 5486.36, Country = "France", Product_Categories = "Accessories", Products ="Helmets", Order_Source = "Sales Person", Year = "FY 2016", Quarter = "Q4" })