TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Daya Daya
NA
4
3.6k
Loading Datagrid view data into Live Chart for C# form app
Jan 30 2020 4:34 AM
I am using Live chart for the first time in a C# form application. I have a data grid view (datagridview1). It has two columns. Date and Price. I am trying to make a cartesian diagram based on these two values. I dunno how to use the data grid view column values in the chart. Any suggestions, please!
cartesianChart1.Series =
new
SeriesCollection
{
new
LineSeries
{
Title =
"Date Vs Price"
,
},
};
cartesianChart1.AxisX.Add(
new
Axis
{
Title =
"Date"
,
//values-- how to get Date values here
});
cartesianChart1.AxisY.Add(
new
Axis
{
Title =
"Price"
,
//values-- how to get price values here
});
//My data is in the following format
|Date |Price |
|2020-01-27 09:42:38 |100 |
|2020-01-27 09:43:38 |200 |
|2020-01-27 09:44:38 |220 |
I am trying to draw a cartesian graph--> Date Vs. Price. Any suggestion to load these data into the live chart from Datagrid view?
Reply
Answers (
2
)
Calculate time between two asp.net Time Picker In Client Ent
string value -1 is not convert to int