🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

Guna.Charts.WinForms

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Guna.Charts.WinForms

A modern WinForms charting library that lets you easily build interactive data visualizations. 16 chart types: - Visualize your data in 16 different chart types (Area, Bar, Bubble, Doughnut, HorizontalBar, Line, Pie, PolarArea, Radar, Scatter, Spline, SplineArea, StackedBar, StackedHorizontalBar, SteppedArea, SteppedLine). Responsive: - Easily respond to changes in screen size. Live charts: - Creating a real-time data dashboard is now very easy. Mixed chart types: - Mix several chart types such as Bar and Line/Area. Requirements Minimum System and User Requirements Guna UI currently work with C# and VB.NET languages, specifically and specially designed for Windows Forms applications. To effectively get the most out of our tools, your system needs to meet the following minimum requirements: - Runs on Windows. - Microsoft .NET Framework 4.0 or higher. - Visual Studio 2012 or later (recommended). As a developer, you need to: - Have a basic knowledge of C# or VB.NET. - Have a basic knowledge of Windows Forms.

1.1.0
NuGet
Version published
Maintainers
1
Created
Source

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 TypeDescription
AreaPlot data points and emphasize the cumulative total.
BarVisually compare data across categories with bars.
BubbleRepresent data points with varying circle sizes.
DoughnutDisplay data in a ring-shaped pie chart.
HorizontalBarUse horizontal bars for an alternative perspective.
LineConnect data points to reveal trends and patterns.
PiePortray data as slices of a traditional pie chart.
PolarAreaArrange data points radially for a unique view.
RadarPresent multivariate data points on a radar chart.
ScatterScatter data points to identify relationships.
SplineSmoothed curve connects data points seamlessly.
SplineAreaBlend spline curves with area charts for impact.
StackedBarStack data categories for a holistic representation.
StackedHorizontalBarStack bars horizontally for engaging visuals.
SteppedAreaCreate a stepped area chart for distinct trends.
SteppedLineIllustrate 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:

  • Open your Visual Studio project.

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

  • In the Package Manager Console, enter the following command:

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

How to Use GunaCharts

  • 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;
    
  • Create a new Form class that inherits from the Form class:

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

    private GunaChart gunaChart;
    private GunaLineDataset gunaLineDataset;
    private GunaBarDataset gunaBarDataset;
    
  • 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();
    }
    
  • 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),
            });
        }
    }
    
  • 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:

  • GunaChartExamples Repository

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.

Keywords

winforms

FAQs

Package last updated on 05 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts