Jump to content
Software FX Community

Pie Chart not showing 1 of the 12 series labels


Warren

Recommended Posts

ChartFX 7

Language c#

I have a pie chart that is bound to a datatable.

Below is the data

  Admin. Sep. w/ Reinstatement (ASWR) 2
  AWOL Separation 6802
  Death Separation 15
  Disciplinary Separation 11444
  Fraudulent Enrollment 24
  Medical Sep. w/ Reinstatement (MSWR) 2690
  Medical Separation (regular) 124
  MSWR Final Close (MSFC) 711
  Ordinary Separation 21108
  Resignation 1565
  Unauthorized Absence Separation 3
  Withdrawal of Parental Consent 368

 

In attachment 1  chartfx1 - you can see the label for Unauthorized Absence Separation does not have a label.

In attachment 2 chart2 - you can see that if I mouse over you can see the  tooltip shows the data is present.

I need to force all series labels to be visible.

Any suggestions?

 

Here is the code for the chart:

 protected void LoadChart()
        {
            DataTable ldt = idt.Copy();

            if (ldt.Rows.Count > 0)
            {
                ChartArea.Visible = true;
                norecords.Visible = false;
            }
            else
            {
                ChartArea.Visible = false;
                norecords.Visible = true;
                return;
            }

            // if table has label, value, value use this
            Chart1.AllSeries.PointLabels.Visible = true;
            Chart1.DataSourceSettings.Fields.Clear();
            Chart1.DataSourceSettings.Fields.Add(new FieldMap("sep_types", FieldUsage.Label));
            Chart1.DataSourceSettings.Fields.Add(new FieldMap("total", FieldUsage.Value));
            Chart1.DataSourceSettings.DataSource = ldt.DefaultView;
            Chart1.Width = 750;
          
            // do this to make mapping work
            Link chartLink = Chart1.AllSeries.Link;
            chartLink.Url = "region.aspx";

            MemoryStream objStream = new MemoryStream();
            Chart1.Export(FileFormat.Jpeg, objStream);
            Chart1.DataBind();

            Byte[] blob = objStream.ToArray();
            objStream.Close();

            JagSession.eis_chart = blob;
        }

 

chart2.png

chartfx1.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...