Jump to content
JChartFX Community
  • 0
miguelaup

Shows the Text property of the Point object.

Question

miguelaup    0

I'm trying to put a custom text on the PointLabels in a pyramid graph but the only way that i have seen is with:

chart1.getAllSeries().getPointLabels().setFormat("%L%");

But i don't know how to change the "text property of the point object"

 

Someone can help me? Someone know other way to change this text?

 

Thanks in advance

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
JuanC    3

Normally, the labels are provided along with the data, e.g.

    chart1.setGallery(cfx.Gallery.Pyramid);
    chart1.setDataSource([{"Value":10, "Product":"ABC"}, {"Value":18, "Product":"DEF"}, {"Value":6, "Product":"GHI"}]);
    var pointLabels = chart1.getAllSeries().getPointLabels();
    pointLabels.setVisible(true);
    pointLabels.setFormat("%l");

Note that to show the label you should use lowercase L in the format.

Regards,

JuanC

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×