Guna.Charts.WinForms 1.0.9

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Guna.Charts.WinForms --version 1.0.9                
NuGet\Install-Package Guna.Charts.WinForms -Version 1.0.9                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Guna.Charts.WinForms" Version="1.0.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Guna.Charts.WinForms --version 1.0.9                
#r "nuget: Guna.Charts.WinForms, 1.0.9"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Guna.Charts.WinForms as a Cake Addin
#addin nuget:?package=Guna.Charts.WinForms&version=1.0.9

// Install Guna.Charts.WinForms as a Cake Tool
#tool nuget:?package=Guna.Charts.WinForms&version=1.0.9                

GunaCharts Readme - Modern WinForms Charting Library

Welcome to GunaCharts, a cutting-edge WinForms charting library that empowers developers to effortlessly create interactive and captivating data visualizations. With a wide array of chart types, responsive design for various screen sizes, real-time data capabilities, and the ability to blend multiple chart types, GunaCharts revolutionizes data visualization.

Chart Types

GunaCharts offers an extensive selection of 16 distinct chart types, allowing you to effectively convey insights from your data. The available chart types are shown below:

Chart Type Description
Area Plot data points and emphasize the cumulative total.
Bar Visually compare data across categories with bars.
Bubble Represent data points with varying circle sizes.
Doughnut Display data in a ring-shaped pie chart.
HorizontalBar Use horizontal bars for an alternative perspective.
Line Connect data points to reveal trends and patterns.
Pie Portray data as slices of a traditional pie chart.
PolarArea Arrange data points radially for a unique view.
Radar Present multivariate data points on a radar chart.
Scatter Scatter data points to identify relationships.
Spline Smoothed curve connects data points seamlessly.
SplineArea Blend spline curves with area charts for impact.
StackedBar Stack data categories for a holistic representation.
StackedHorizontalBar Stack bars horizontally for engaging visuals.
SteppedArea Create a stepped area chart for distinct trends.
SteppedLine Illustrate data changes with stepped line segments.

Responsive Design

With GunaCharts, your data visualizations seamlessly adapt to diverse screen sizes. Whether your users view your application on a large monitor or a mobile device, GunaCharts' responsive design ensures that charts remain clear and usable.

Live Charts

Easily create real-time data dashboards using GunaCharts. The library simplifies the creation of dynamic data displays that update in real-time, enabling effective monitoring of changing data patterns.

Mixed Chart Types

GunaCharts empowers you to blend different chart types effortlessly. By combining chart types like Bar and Line/Area, you can craft unique visualizations that provide a comprehensive view of your data.

Compatibility

GunaCharts seamlessly integrates with various .NET framework versions:

  • .NET Framework v4.0 or higher
  • .NET Core App 3.1 or higher
  • .NET 6
  • .NET 7

Supported IDE

GunaCharts is designed for use with Visual Studio, starting from Visual Studio 2012 and higher versions.

Installation via Package Manager Console

To integrate GunaCharts into your Visual Studio project using the Package Manager Console, follow these steps:

  1. Open your Visual Studio project.

  2. Go to Tools > NuGet Package Manager > Package Manager Console.

  3. In the Package Manager Console, enter the following command:

    Install-Package Guna.Charts.WinForms
    
  4. Press Enter to execute the command. The package will be installed into your project.

How to Use GunaCharts

  1. Begin by importing the required namespaces at the beginning of your Form class:

    using System; 
    using System.Drawing; 
    using System.Windows.Forms; 
    using Guna.Charts.WinForms;
    
  2. Create a new Form class that inherits from the Form class:

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            InitializeGunaChart();
        }
    }
    
  3. Inside the Form class, declare the variables needed for GunaCharts:

    private GunaChart gunaChart;
    private GunaLineDataset gunaLineDataset;
    private GunaBarDataset gunaBarDataset;
    
  4. Implement the InitializeGunaChart method, where we set up both bar and line charts:

    private void InitializeGunaChart()
    {
        // Create a new instance of GunaChart
        gunaChart = new GunaChart();
        gunaChart.Dock = DockStyle.Fill;
        Controls.Add(gunaChart);
    
        // Set up GunaLineDataset
        gunaLineDataset = new GunaLineDataset();
        gunaLineDataset.Label = "Line";
        gunaLineDataset.LegendBoxFillColor = Color.DodgerBlue;
        gunaLineDataset.FillColor = Color.DodgerBlue;
        gunaLineDataset.BorderColor = Color.DodgerBlue;
        gunaLineDataset.YFormat = "Income {0:C}";
    
        // Set up GunaBarDataset
        gunaBarDataset = new GunaBarDataset();
        gunaBarDataset.Label = "Bar";
        gunaBarDataset.LegendBoxFillColor = Color.MediumSlateBlue;
        gunaBarDataset.FillColors.Add(Color.MediumSlateBlue);
        gunaBarDataset.FillColors.Add(Color.MediumPurple);
        gunaBarDataset.YFormat = "C";
    
        // Add the datasets to the Datasets collection of GunaChart
        gunaChart.Datasets.Add(gunaLineDataset);
        gunaChart.Datasets.Add(gunaBarDataset);
    
        // Generate data and labels for the datasets
        GenerateDataAndLabels();
    }
    
  5. Define the GenerateDataAndLabels method to populate the datasets with data:

    private void GenerateDataAndLabels()
    {
        // Sample labels for the x-axis representing months
        string[] monthLabels = { "January", "February", "March", "April", "May", "June", "July" };
    
        // Generate random data for the datasets    
        var random = new Random();
        foreach (var label in monthLabels)
        {
            gunaLineDataset.DataPoints.Add(new LPoint()
            {
                Label = label,
                Y = random.Next(10, 100),
            });
    
            gunaBarDataset.DataPoints.Add(new LPoint()
            {
                Label = label,
                Y = random.Next(10, 100),
            });
        }
    }
    
  6. Run your application.

Exporting Charts

Capture your visually appealing charts with GunaCharts' export feature. Simply:

  • Export the chart as an image using the save dialog::

    gunaChart.Export();
    
  • Export the chart to a specific file path:

    gunaChart.Export("C:\chart.png");
    
  • Export the chart with a specific image format (e.g., PNG):

    gunaChart.Export("C:\chart.png", System.Drawing.Imaging.ImageFormat.Png);
    

Activating Zoom Functionality

GunaCharts provides an immersive zooming experience to magnify specific chart areas for a closer analysis. You can enable and configure zooming with the following steps:

  • Activate Zoom Mode (Choose one): Zoom along the X-axis:

    gunaChart.Zoom = ZoomMode.X;
    

    Zoom along the Y-axis:

    gunaChart.Zoom = ZoomMode.Y;
    

    Zoom along both X and Y axes:

    gunaChart.Zoom = ZoomMode.XY;
    
  • To deactivate zoom functionality:

    gunaChart.Zoom = ZoomMode.None;
    

Zoom actions can be performed using the mouse wheel or pinch gestures if your device supports touch screen interaction. Additionally, the zoom functionality of GunaCharts can be achieved through various methods:

  • Zoom In:

    gunaChart.ZoomIn();
    
  • Zoom Out:

    gunaChart.ZoomOut();
    
  • Reset Zoom

    gunaChart.ResetZoom();
    

Handling Rendering Issues

If you encounter issues with chart rendering, trigger a manual update to ensure smooth rendering:

gunaChart.Update();

Examples

Explore GunaChartExamples repository on GitHub to discover how to implement GunaCharts in your projects:

Learn more about GunaCharts and its capabilities through these links:

Start using GunaCharts to elevate your WinForms data visualization and present insights in a compelling and informative manner.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net6.0-windows7.0 is compatible.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
.NET Framework net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

  • .NETFramework 4.0

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net6.0-windows7.0

  • net7.0-windows7.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 703 11/5/2024
1.0.9 10,891 8/28/2023
1.0.8 5,746 2/21/2023
1.0.4 6,973 5/18/2022
1.0.3 2,614 1/31/2022
1.0.2 2,259 10/11/2021
1.0.1 1,403 9/22/2021

Note: Before updating Guna.UI, don't forget to backup your project!!

Version 1.0.9

Stay updated with GunaCharts' latest enhancements and fixes via our release notes:

Bug Fixes:
1. Background Display Issue with Multiple Charts:
  Resolved an issue where the chart's background would display as blank or gray when multiple charts were used simultaneously. The fix ensures that the background renders correctly for all instances of the chart.
2. IndexLabel Location Beyond Scale Bounds:
  Addressed a bug that caused indexLabels to be incorrectly positioned beyond the scale bounds. This issue has been rectified, and indexLabels are now properly aligned within the scale boundaries.
3. Enhanced Update and Rendering Performance:
  Optimized the update and rendering process for improved performance. The chart now updates and renders more quickly, leading to a smoother user experience.
   
New Features:
1. Zoom Functionality:
  Introduced a new zoom feature that enables users to magnify specific areas of the chart. Three zoom modes are available: X, Y, and XY. To activate zoom, set the `Zoom` property on the `GunaChart` instance.
  Example:
  GunaChart.Zoom = ZoomMode.X;

  Zoom actions can be performed using the mouse wheel or pinch gestures if your device supports touch screen interaction. Additionally, the zoom functionality of GunaCharts can be achieved through various methods:
  GunaChart.ZoomIn();
  GunaChart.ZoomOut();
  GunaChart.ResetZoom();

2. Customizable Legend Box:
  Implemented the ability to customize the fill color and border color of the legend box. This feature can be configured for individual datasets.
  Example:
  dataset.LegendBoxFillColor = Color.Red;
  dataset.LegendBoxBorderColor = Color.Black;

3. Number Formatting for Chart Values:
  Added support for formatting numerical values displayed on the chart. Users can specify number formats directly on the dataset.
  Example:
  dataset.YFormat = "C";
  dataset.YFormat = "Car {0:C}";

4. Corner Radius for Bar and HorizontalBar Charts:
  Incorporated the ability to set corner radius values for Bar and HorizontalBar chart types directly on the dataset.
  Example:
  BarDataset.CornerRadius = 5;

  Alternatively, automatic rounded corners can be enabled by setting `AutoRoundedCorners` to true.
  Example:
  BarDataset.AutoRoundedCorners = true;

Happy charting!