ComponentOne FlexPivot for WinForms
FlexPivot Architecture / FlexPivotChart
In This Topic
    FlexPivotChart
    In This Topic

    FlexPivotChart helps to visually represent the data fetched from the data source in the form of Pivot Charts. The FlexPivotChart control integrates the features of the lightweight and fast FlexChart control in FlexPivot to render high-quality charts.

    FlexPivotChart_InAction

    Supported Chart Types

    FlexPivotChart supports the following chart types.

    Chart Types Description
    Bar A Bar chart compares values across various categories or displays variations in a data series over time.
    Column A Column chart, just like the Bar Chart, represents variation in a data series over time or compares different items.
    Area An Area chart draws data series by connecting data points against Y-axis and filling the area between the series and X-axis.
    Line A Line chart displays trends over a period of time by connecting different data points in a series with a straight line.
    Scatter The Scatter Chart, which is also known as the XY Chart, depicts relationship among items of different data series
    Pie Pie charts are circular graphs that display the proportionate contribution of each category which is represented by a pie or a slice.

    Axis Scrolling

    The FlexPivotChart class provides the UseAxisScrollbar property to set scrollbar on the x-axis or y-axis when the number of labels is large. The scrolling feature has been adapted from the FlexChart control and is useful while plotting and analyzing huge chunks of data. It lets the end-user focus on selected range of values in detail. Two scroll buttons are provided on either ends of the scrollbar to scroll through the selected range.

    ' Use axis scrollbar when the number of labels is large
    FlexPivotPage1.FlexPivotChart.UseAxisScrollbar = True
    
    // Use axis scrollbar when the number of labels is large
    flexPivotPage1.FlexPivotChart.UseAxisScrollbar = true;
    

    FlexPivotChart Palette

    FlexPivotChart provides 16 pre-defined color palettes to choose from, so that the user can display charts matching the UI of their business applications. You can apply these palettes to FlexPivotChart using the Palette property, which accepts the values from Palette enumeration of C1.Chart namespace. This property is set to Standard by default. You can also create a custom palette using the existing color palettes.

    ' Use Palette property
    FlexPivotPage1.FlexPivotChart.Palette = C1.Chart.Palette.Modern
    
    // Use Palette property
    flexPivotPage1.FlexPivotChart.Palette = C1.Chart.Palette.Modern;
    

    Axis Grouping

    Axis grouping refers to the grouping of axis labels which helps in better readability and data analysis at different levels. There can be three types of data based on which implementation of axis grouping also varies: categorical, numerical and DateTime format. In FlexPivotChart, all these three implementations can be done using the ShowHierarchicalAxes property of the FlexPivotChart class.

    For instance, let us assume you are using the FlexPivotChart to visually show the sales data of product sold in the world and you want to group the data on continent basis. To accomplish this, you can use the ShowHierarchicalAxes property to group the data according to continents basis. The following gif shows the same.

    Showing hierarchical axes

    The following sample code sets the hierarchical axes in the FlexPivotChart.

    C#
    Copy Code
    chart.ShowHierarchicalAxes = true;
    

    Chart Customization

    You can use the Updating and Updated events of the FlexPivotChart class for customization of the FlexPivotChart. Updating event occurs before the FlexPivotChart starts updating, on the other hand, Updated event occurs after the FlexPivotChart finishes updating.

    In the following GIF, both events are used to display label when the FlexPivotChart starts and finishes the updating process.

    Using Updating and Updated events