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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:13:55+00:00 2026-06-17T08:13:55+00:00

How can I remove the —–Series1 text (top right, near button1) How can I

  • 0
  1. How can I remove the “—–Series1” text (top right, near button1)
  2. How can I make the blue stepline thinker, and remove the background lines?
  3. How can I draw color to the background, such as the area from y=0 to y=1 colored as grey.
  4. How can I add mousewheel event, so that i can use Ctrl+mousewheel to zoom in and out the chart?

Thank you!

enter image description here

  • 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-17T08:13:56+00:00Added an answer on June 17, 2026 at 8:13 am

    Below I have provided some example code to answer your questions. My answers to 3 and 4 are basic examples, and you will have to calculate the correct values for painting and zooming in your application.

        private void button1_Click(object sender, EventArgs e)
        {
            setupChart();
        }
    
        private void setupChart()
        {
            // 1.
            foreach (System.Windows.Forms.DataVisualization.Charting.Legend legend in chart1.Legends)
                legend.Enabled = false;
    
            // 2.
            chart1.Series[0].BorderWidth = 5;
            chart1.ChartAreas[0].AxisX.MajorGrid.Enabled = false;
            chart1.ChartAreas[0].AxisY.MajorGrid.Enabled = false;
    
            // 3.
            chart1.Paint += new PaintEventHandler(chart1_Paint);
    
            // 4.
            chart1.MouseWheel += new MouseEventHandler(chart1_MouseWheel);
            //chart must have focus for MouseWheel event to fire
            chart1.Focus();
        }
    
        private void chart1_Paint(object sender, PaintEventArgs e)
        {
            //basic example of painting
    
            //determine size of area to paint
            Size areaSize = new Size(50, 50);
    
            //determine location to paint
            Point point = new Point(100, 450);
    
            e.Graphics.FillRectangle(new SolidBrush(Color.Gray),
                point.X, point.Y, areaSize.Width, areaSize.Height);
        }
    
        private void chart1_MouseWheel(object sender, MouseEventArgs e)
        {
            //basic example of zooming in and out
            if (e.Delta > 0)
            {
                chart1.ChartAreas[0].AxisX.ScaleView.Zoom(
                    chart1.ChartAreas[0].AxisX.ScaleView.ViewMinimum / 2,
                    chart1.ChartAreas[0].AxisX.ScaleView.ViewMaximum / 2);
                chart1.ChartAreas[0].AxisY.ScaleView.Zoom(
                    chart1.ChartAreas[0].AxisY.ScaleView.ViewMinimum / 2,
                    chart1.ChartAreas[0].AxisY.ScaleView.ViewMaximum / 2);
            }
            else
            {
                if (chart1.ChartAreas[0].AxisX.ScaleView.ViewMaximum <
                    chart1.ChartAreas[0].AxisX.Maximum ||
                    chart1.ChartAreas[0].AxisX.ScaleView.ViewMinimum >
                    chart1.ChartAreas[0].AxisX.Minimum)
                {
                    chart1.ChartAreas[0].AxisX.ScaleView.Zoom(
                        chart1.ChartAreas[0].AxisX.ScaleView.ViewMinimum * 2,
                        chart1.ChartAreas[0].AxisX.ScaleView.ViewMaximum * 2);
                    chart1.ChartAreas[0].AxisY.ScaleView.Zoom(
                        chart1.ChartAreas[0].AxisY.ScaleView.ViewMinimum * 2,
                        chart1.ChartAreas[0].AxisY.ScaleView.ViewMaximum * 2);
                }
                else
                {
                    chart1.ChartAreas[0].AxisX.ScaleView.ZoomReset();
                    chart1.ChartAreas[0].AxisY.ScaleView.ZoomReset();
                }
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way I can remove the background bar image in the SeekBar
How can remove just background-color: rgb(255, 196, 196); in following select:style after click with
Does anyone know how I can remove links from the top menu using local.xml.
I'm wondering if I can remove my imageview background after I select an image
How I can remove this text(Welcome to islanders No front page content has been
we can remove formula from one cell by cell.setCellFormula(null) . but if i want
One can remove all calls to printf() using #define printf . What if I
How we can remove an array entry from : var a = [],b =
How to I can remove posts from a specific category from homepages in wordpress?
I am looking for an API that can remove bundle items added in a

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.