Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8070249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:21:37+00:00 2026-06-05T13:21:37+00:00

I want to create a chart and i am using the charts from the

  • 0

I want to create a chart and i am using the charts from the toolbox in Visual studio 2010. This is the first time i am trying to do this and so far i have learned the basics of the chart like how to create datapoints and add them to the series in order to get the chart. What i wanted to know is that if its possible to make the datapoints visible to the user (like the dots in a point chart) and the user to be able to click on a datapoint and get a specific result. What i was thinking is that since i am creating the datapoint is there an option to make it “clickable” or do i have to create seperate mouseclick events for every datapoint. Excuse me for my ignorance but i am new to this. Where can i find a guide that will help me to create the chart.
Here is a part of my code so far:

chart1.Series[0].IsVisibleInLegend = false;
chart1.Series[0].ChartType = SeriesChartType.FastLine;

DateTime sday = Convert.ToDateTime(earnings1.dataGridView1[0, 0].Value.ToString());
chart1.Series[0].XValueType = ChartValueType.String;
int i = 0;
        foreach (DataGridViewRow dgvr in earnings1.dataGridView1.Rows)
        {
            decimal testing = Convert.ToDecimal(earnings1.dataGridView1[1, i].Value);
            testing = decimal.Truncate(testing);

            var point = new DataPoint(i+1, Convert.ToDouble(testing));

            point.Label = testing.ToString();
            point.Font = new Font("Century Gothic", 8, FontStyle.Bold);
            chart1.Series[0].Points.Add(point);
            chart1.Series[0].Points[i].AxisLabel = sday.ToString("dd/MM/yyyy");
            sday = sday.AddDays(1);
            i++;
          }

what i am doing is that i have a datagridview with 2 columns. One with the date and the other column with a decimal number. I created a chart with the dates on the x axis (custom labeled since the dates are from a mysql database and the format is yyyy:mm:dd and i convert it to dd/MM/yyyy) and on the y axis the values. I am creating a datapoint a each day with its value aand i plot them on the chart. How can i click now on the points so that for example when i click on the value at 24/May/2012 to do something like show some other information from the database at that specific date.
Thank you in advance for your support, any help will be truly appreciated.
Sincerely
George Georgiou

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:21:40+00:00Added an answer on June 5, 2026 at 1:21 pm

    you cant add click events on datapoints. What you can do though is to add annotations on the datapoints and use the is selected event handler on the annotations. Pretty nice since you can set them properties such as font, size, border type, color etc..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a ColumnSeries Bar Chart in WPF using C#. I shall
I am reading data continuously from a sensor and want to plot chart using
I have encountered this problem: Depending on numbers from I want to create a
The following example is from Google to create a ColumnChart using Google Charts function
I am using Spreadsheetgear to create and modify charts. I can create a chart
I am using Spreadsheetgear to create charts in Excel. I create a column chart
I'm trying to create a chart using the Google Visualization API, with PHP &
I am trying to create a simple and animated pie chart using CAShapeLayer .
I want to generate line graph based on database. First time i am using
i want to create a chat app using flex 4.5 mobile project for android

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.