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 7992729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:39:05+00:00 2026-06-04T13:39:05+00:00

I have a fully functioning Dynamic chart control( just the regular ASP.net Chart )

  • 0

I have a fully functioning Dynamic chart control( just the regular ASP.net Chart ) It works great but I’ve run into a problem trying to add check boxes to the legend. I’m trying to add them next to the series names so the user can hide or view the respective series data. The chart is plotting data for roughly 42 employees. So being able to select and hide data is very important. I’ve been researching this for a few days now and I’ve found examples for 3rd party chart tools but i need to do this in MSVS 2010 standard charting tool.

This is how I create the Chart.

 for (int emp = 1; emp < empRowList.Length; emp++)
        {
            chartB.Series.Add(empRowList[emp]);
            chartB.Series[empRowList[emp]].ChartType = SeriesChartType.Point;
            chartB.Series[empRowList[emp]].MarkerSize = 10;
            chartB.Series[empRowList[emp]].MarkerStyle = MarkerStyle.Star4;            

            for (int month = 1; month < 12; month++)
            {
                    chartB.Series[empRowList[emp]].Points.AddXY(mfi.GetMonthName(month), employeeStats[month, emp]);
                    chartB.Series[empRowList[emp]].Points[chartB.Series[empRowList[emp]].Points.Count - 1].ToolTip = empRowList[emp] + " - " + employeeStats[month, emp];                   
            }
        }

Here is how I format the chart

 chartB.DataSource = t.Tables["info"];
 chartB.DataBind();
 chartB.Legends.Add(new Legend("Legend"));
 chartB.Legends["Legend"].Alignment = StringAlignment.Center;
 chartB.Legends["Legend"].Docking = Docking.Top;

I looked through this post thinking it could be augmented to help but since his series aren’t added dynamically i’m not sure if it is the right direction to pursue.

ASP .net 4 Chart Control Legend formatting is not displaying at all

I’ve also looked in to using custom legends but read that they aren’t linked to the data so i thought that might also be that wrong direction.

If anyone could help it would be greatly appreciated i’m kind of at a stand still till I can figure this out.

Thanks in advance

  • 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-04T13:39:06+00:00Added an answer on June 4, 2026 at 1:39 pm

    I was able to find a solution similar to what i wanted using the code from the link above but could never quite get the legend to work properly so i scrapped that idea and just dynamically created a check-box bank underneath my chart that hides/shows series. Wasn’t too difficult just needed to create a class and deal with the click event verses the redraw of the graph.

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

Sidebar

Related Questions

Ok, Just some background... I have a fully functioning game that uses the canvas
I have fully developed application. I have to implement UITabBar into the application, but
Hi Guys I have a fully functioning query, but need to do a little
I have a nice fully functioning module (wrtten using tcl/cpp) it works fine. I
I have a CSS mouseover slider fully functional here http://jsfiddle.net/gU4sw/13/ . When I add
I have a pure CSS mouseover slider fully functional here http://jsfiddle.net/gU4sw/13/ . When I
I have a fully functioning program that worked. However it had two dialogs that
I have a fully functioning Android widget that consists of a service provider class,
I have a fully functioning website with user accounts/profiles and admin area. I would
I have already developed a fully-functioning website, and our team is looking to export

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.