Guna.Charts.WinForms 1.1.0

Prefix Reserved
dotnet add package Guna.Charts.WinForms --version 1.1.0                
NuGet\Install-Package Guna.Charts.WinForms -Version 1.1.0                
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.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Guna.Charts.WinForms --version 1.1.0                
#r "nuget: Guna.Charts.WinForms, 1.1.0"                
#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.1.0

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

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 665 11/5/2024
1.0.9 10,881 8/28/2023
1.0.8 5,742 2/21/2023
1.0.4 6,970 5/18/2022
1.0.3 2,613 1/31/2022
1.0.2 2,257 10/11/2021
1.0.1 1,403 9/22/2021

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

Bug Fixes for Guna.Charts Library - Version [1.1.0]

1. Legend Label Fix on GunaChart Control
- Issue Description: In some dataset types such as GunaPieDataset, GunaPolarAreaDataset, and GunaDoughnutDataset, the legend labels were either not displayed correctly or did not reflect the expected values.
- Fix: This issue has been resolved so that the legend labels are now correctly displayed according to the data in the chart.

2. Tooltip Display Fix
- Issue Description: The tooltip that appears when users hover over chart elements sometimes showed incorrect information when values were applied to properties such as dataset.XFormat, dataset.YFormat, and dataset.RadiusFormat.
- Fix: This bug has been fixed, and the tooltip now accurately displays the correct information. It reflects the proper values based on the format applied to the dataset properties. The tooltip will show the correct value according to the specified format for the X and Y axes, as well as the radius.

Happy charting!