C# Tutorial - Live Chart/Graph in C# Winforms Application | FoxLearn

preview_player
Показать описание
Live Chart/Graph using LiveCharts control help you create c# graphs and charts windows application using c# chart control.

Live Charts is Simple, flexible, interactive & powerful data visualization for .Net. LiveCharts is just data visualization but built and for everyone. Enter data in DataGridView, then generate a pie chart from data in DataGridView using windows forms chart.

Through this video you will learn the following topics:

As you know, Live Charts is a net chart library supports c# real time chart, you can use the LiveCharts.WinForms to create c# pie chart.

This video show you how do i use the livecharts library in c#, include the way to download net charting library from the nuget, then using live charts c# to add live chart column chart through chart in c# windows application.

First off, you need to create a new project live chart winform, then install c# chart library open source from the manage nuget packages, then add c# chart datasource through the c# chart example in winforms chart.
Рекомендации по теме
Комментарии
Автор

Good to learn C#. Need how to code data in dgv and based on dgv, how to populate chart using Tabs control.

kumaresha
Автор

foreach (var obj in data.Product)

my data is underlined red, any reasons why

WILLFACTOR
Автор

Keep it up FoxLearn.Thank you for this video.

christanbardemorilla
Автор

what do i change if i want to display text in the first column and int values in the second column???

billyjones
Автор

Thank you so much ! love you in the future of countinue it - you can show how to learn machine to detect own picture for example detect logo fox learn on pictures :) You forgot about that :(

adamzbudniewek
Автор

plss show how to use other charts, like cartesian

DD-rzwl
Автор

Again nice video!!!! Congrats for your work!
Can you help with this problem: Unclosed quotation mark after the character string "

bojidarkamenski
Автор

Can't learn with music in the background. It's a bad combination trying to listen to the presenter and having music at the same time.

patriciaspagnolo
Автор

Hello
i need help
how to released memory after form closed c#
i want released the memory winch allocated by form can you make one video on that
thanks in Advance

milinddabhade
Автор

Is visual studio 2012 can use and download live chart? Because i cant download on it

realprof
Автор

My Chart is black on execution but the information will loaded, how a fix that.

luiseduardo
Автор

Could You make tutorial how to make combobox in listview?

ddyno
Автор

Can you make a Video About how to Code a simple teamspeak 3 Client?

benjy
Автор

Not Working Man I Dont Know Why

SeriesCollection Series = new SeriesCollection();
foreach (var obj in data.Revenue)
Series.Add(new PieSeries() { Title = obj.Year.ToString(), Values = new ChartValues<int> { obj.Earning }, DataLabels = true, LabelPoint = labelPoint });

pieChart1.Series = Series;

I Am having error In data.Revenue in foreach

abuhuzaifa
Автор

please make video about Chatbot in Asp.NET

kamranmmmdov
Автор

using LiveCharts;
using LiveCharts.Wpf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace live_chart
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

Func<ChartPoint, string> labelPoint = chartpoint => string.Format("{0} ({1:P})", chartpoint.Y, chartpoint.Participation);

private void pieChart1_ChildChanged(object sender, e)
{
// This event can be used for handling changes in the chart's child elements if needed
}

private void sender, DataGridViewCellEventArgs e)
{
// This event can be used for handling cell content click events in the DataGridView if needed
}

private void button1_Click(object sender, EventArgs e)
{
SeriesCollection series = new SeriesCollection();

// Assuming data.Revenue is a collection of objects with Year and Total properties
foreach (var obj in data.Revenue)
{
// Convert obj.Total to int before adding it to the chart values
int totalValue;
if (int.TryParse(obj.Total, out totalValue))
{
series.Add(new PieSeries
{
Title = obj.Year.ToString(),
Values = new ChartValues<int> { totalValue },
DataLabels = true,
LabelPoint = labelPoint
});
}
else
{
// Handle the case where obj.Total is not a valid integer
MessageBox.Show($"Invalid total value: {obj.Total}");
}
}

pieChart1.Series = series;
}

private void Form1_Load(object sender, EventArgs e)
{
pieChart1.LegendLocation = LegendLocation.Bottom;
}
}
}
use this code

JannatRocks