Jump to content
Software FX Community
Sign in to follow this  
User (Legacy)

Customizing Point Labels

Recommended Posts

Hi.

I'd like to customize the point labels in a pie chart, in order to show only

the percentage instead of showing the percentage and the label. I'm also

getting some weird "3" label that I don't know where it came from. I can

post a screenshot if you want to.

Is there a way to do this?

Another thing, does anyone else has problems with displaying the legend box

(or legserbox) correctly? I'm having problems making it show the colored

squares for the legend, see my code below, this code is called directly on a

button click.

Oh, I forgot...I'm using eVC++ on PocketPC 2000

// START CODE SNIP

m_chart.ClearData(CD_ALLDATA);

m_chart.SetLegendBox(TRUE);

m_chart.GetPointLabelsFont().SetBold(TRUE);

m_chart.GetPointLabelsFont().SetWeight(10);

m_chart.GetAxis().GetItem(AXIS_Y).SetVisible(FALSE);

m_chart.GetAxis().GetItem(AXIS_X).SetVisible(FALSE);

m_chart.SetAxesStyle(CAS_NONE);

m_chart.OpenDataEx(COD_VALUES, 1, count_valores);

series = m_chart.GetSeries().GetItem(0);

series.SetGallery(PIE);

series.SetPointLabels(TRUE);

for (i = 0; i < count_valores; i++) {

Label_Value *item = (Label_Value

*)lista_final.GetAt(lista_final.FindIndex(i));

series.SetYvalue(i, item->m_value);

m_chart.SetLegend(i, item->m_label);

}

m_chart.CloseData(COD_VALUES | COD_SMOOTH);

// END CODE SNIP

Share this post


Link to post
Share on other sites

Hello,

You could use the PointLabelMask property. This property was accidentally

not added to the help file but you could reference the TipMask property

since it uses the same syntax and performs the same function. You can also

use the GetPointLabel event to customize PointLabels. You will need to use

this property in conjunction with the Notify property of the Y-Axis object.

Concerning the "3" label problem. No we have not experienced this issue.

If you continue to receive this problem then please send us both an image of

the problem but also a small sample that reproduces the behavior.

Concerning the issue with the legend box. My first suggestion is to pass

all data to ChartFX first. Then assign your legend labels. After you have

passed all of your labels you should then enable the legend box. Once again

if you continue to have problems then send both a screen shot as well as a

simple sample.

Justin Trask

Tech. Support

561-392-2023

"Pedro Gomes" <pedro.gomes@onthego.pt> wrote in message

news:BNGfnh5QCHA.1060@webserver1.softwarefx.com...

> Hi.

>

> I'd like to customize the point labels in a pie chart, in order to show

only

> the percentage instead of showing the percentage and the label. I'm also

> getting some weird "3" label that I don't know where it came from. I can

> post a screenshot if you want to.

>

> Is there a way to do this?

>

> Another thing, does anyone else has problems with displaying the legend

box

> (or legserbox) correctly? I'm having problems making it show the colored

> squares for the legend, see my code below, this code is called directly on

a

> button click.

>

> Oh, I forgot...I'm using eVC++ on PocketPC 2000

>

> // START CODE SNIP

> m_chart.ClearData(CD_ALLDATA);

> m_chart.SetLegendBox(TRUE);

> m_chart.GetPointLabelsFont().SetBold(TRUE);

> m_chart.GetPointLabelsFont().SetWeight(10);

> m_chart.GetAxis().GetItem(AXIS_Y).SetVisible(FALSE);

> m_chart.GetAxis().GetItem(AXIS_X).SetVisible(FALSE);

> m_chart.SetAxesStyle(CAS_NONE);

> m_chart.OpenDataEx(COD_VALUES, 1, count_valores);

> series = m_chart.GetSeries().GetItem(0);

> series.SetGallery(PIE);

> series.SetPointLabels(TRUE);

> for (i = 0; i < count_valores; i++) {

> Label_Value *item = (Label_Value

> *)lista_final.GetAt(lista_final.FindIndex(i));

>

> series.SetYvalue(i, item->m_value);

> m_chart.SetLegend(i, item->m_label);

> }

> m_chart.CloseData(COD_VALUES | COD_SMOOTH);

> // END CODE SNIP

>

>

Share this post


Link to post
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.

Loading...
Sign in to follow this  

×
×
  • Create New...