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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:34:22+00:00 2026-05-24T06:34:22+00:00

I am using ZedGraph to create a pie chart, and adding items to it

  • 0

I am using ZedGraph to create a pie chart, and adding items to it using the AddPieSlice() method, all overloads of which require a label parameter. I pass in null for this as I don’t want any labels for the segments. However the graph still draws a line coming out of each segment that I think is supposed to join it to it’s non-existent label.

Is there any way to remove these lines?

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-05-24T06:34:23+00:00Added an answer on May 24, 2026 at 6:34 am

    You should use PieItem.LabelType = PieLabelType.None in addition to whatever value (including null) you assign the label.

    For example:

    GraphPane myPane = zedGraphControl1.GraphPane;
    
    PieItem pieSlice1 = myPane.AddPieSlice(10, Color.Blue, 0F, "Label1");
    PieItem pieSlice2 = myPane.AddPieSlice(15, Color.Orange, 0F, "Label2");
    PieItem pieSlice3 = myPane.AddPieSlice(35, Color.Green, 0F, "Label3");
    PieItem pieSlice4 = myPane.AddPieSlice(40, Color.DarkGray, 0F, "Label4");
    
    // optional depending on whether you want labels within the graph legend
    myPane.Legend.IsVisible = false;
    
    pieSlice1.LabelType = PieLabelType.None;
    pieSlice2.LabelType = PieLabelType.None;
    pieSlice3.LabelType = PieLabelType.None;
    pieSlice4.LabelType = PieLabelType.None;
    
    zedGraphControl1.AxisChange();
    zedGraphControl1.Invalidate();
    
    
    highLine.Symbol.Type = SymbolType.Circle;
    highLine.Symbol.Fill.IsVisible = false;
    highLine.Symbol.Border.Width = 2F;
    highLine.Symbol.Size = 16F;
    
    zedGraphControl1.AxisChange();
    zedGraphControl1.Invalidate();
    

    Here is the resulting pie chart:

    Pie chart with no labels

    Here are some ZedGraph references:

    • Introduction and examples: http://www.codeproject.com/KB/graphics/zedgraph.aspx
    • Source code documentation: http://zedgraph.sourceforge.net/documentation/default.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using ASP.NET MVC there are situations (such as form submission) that may require a
I am using ZedGraph and I want to zoom to a selected area by
I am using ZedGraph's master pane to display two graphs that have synchronized X
I'm using ZedGraph and want to know how I can find the points that
I'm using ZedGraph for my 2D graphing needs, but for a project, I need
How to draw triangle wave (symmetrical) using ZedGraph ? alt text http://img101.imageshack.us/img101/8482/okr20troj.jpg Preferably with
Using the ZedGraph control, say I am plotting data that has Y values of
I am using a 3rd-party rotator object, which is providing a smooth, random rotation
Using online interfaces to a version control system is a nice way to have
Using PyObjC , you can use Python to write Cocoa applications for OS X.

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.