Jump to content
Software FX Community

Pyramid Chart Data Label


stephenabdo
 Share

Recommended Posts

 The legendbox should show the colors by default. The following sample code will reproduce the attached chart. Could you post an image and some sample code to reproduce what you currently have?

 

chart1.Data.Series = 1;chart1.Data.Points = 4;chart1.Data[0, 0] = 13;chart1.Data[0, 1] = 20;chart1.Data[0, 2] = 17;chart1.Data[0, 3] = 9;chart1.Gallery = Gallery.Pyramid;

Link to comment
Share on other sites

 Try the code bellow. Notice I use the %l parameter to grab the labels from the X Axis. The X Axis is not drawn in a Pyramid chart, but it's labels populate the Legend Box as well in these types of chart (as well as in pie and doughnut). The pointlabels format parameters are the same as the ones for the tooltip format. They can be found in the API, under ToolTipFormat property of the chart class. Also note I increased the right margin to avoid clipping.

 

chart1.Data.Series = 1;chart1.Data.Points = 4;chart1.Data[0, 0] = 13;chart1.Data[0, 1] = 20;chart1.Data[0, 2] = 17;chart1.Data[0, 3] = 9;chart1.AxisX.Labels[0] = "First Point";chart1.AxisX.Labels[1] = "2nd Point";chart1.AxisX.Labels[2] = "Third";chart1.AxisX.Labels[3] = "Last Point";chart1.Gallery = Gallery.Pyramid;chart1.AllSeries.PointLabels.Visible = true;chart1.AllSeries.PointLabels.Format = "%l";chart1.AllSeries.PointLabels.Alignment = StringAlignment.Near;chart1.AllSeries.PointLabels.LineAlignment = StringAlignment.Center;chart1.PlotAreaMargin.Right = 50;

ChartFXTest5.zip

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.

 Share

×
×
  • Create New...