Jump to content
JChartFX Community
  • 0

Some questions regarding funnel charts and charts in general.


Bogdan

Question

Hi. I just started checking out jchartfx to see if it suits our needs and while it looks promising there are a couple of questions that I need sorting out.

 

  • Is there a way to remove the background and border of the chart?
  • Can I remove the legend and incorporate it into the label somehow? Funnel charts are quite big and the legend takes up a lot of space. I was thinking of making the labels look like "Item name, value".
  • Is there a fast way to add tooltips and links to the labels/sections of the funnel (and bars/slices for bar/pie charts) or do I have to implement them myself?
  • And lastly; Is there a way to make sure the value labels don't overlap? The labels overlap badly in the case of funnel charts with small sections.
  • I almost forgot: What kind of formatting do you use with the chart1.getAllSeries().getPointLabels().setFormat(); methods? I want to format it as float with two decimal digits if possible, or just float and i'll calculate within two decimals myself if needed. Your example uses %v but that doesn't show decimals at all.
 
Thanks in advance.

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You can remove the border as follows

    chart1.setBorder(null);

To remove the border you have a couple of options, if you are using our CSS you can edit it and make sure the fill for .jchartfx .Border is set to the same color as your page or transparent. If you are not using our CSS you can use. In general if you include our CSS that would be the way to change colors, line widths, etc. If you do not include our CSS then you can use our API to change those visual properties.

    chart1.setBackColor("#00FFFFFF");

To remove the legend box

    chart1.getLegendBox().setVisible(false); 

To show and change the text for the labels

    chart1.getAllSeries().getPointLabels().setVisible(true);

    chart1.getAllSeries().getPointLabels().setFormat("%l, %v");

Tooltips are handled automatically by the library, you can change the text that appears for the tooltips using our API or handling an event. We do not have special support for labels but you can handle an event when the user clicks on a bar/marker

Unfortunately there is no property to make sure labels do not overlap.

To change the number of decimals shown for the point labels

    chart1.getAxisY().getLabelsFormat().setDecimals(2);

Regards,


JuanC 

Link to comment
Share on other sites

  • 0

Thanks for the help. That covers all the problems except for the Numbers overlaping, which is the most obvious one for the user. I absolutely need to find a solution to it. Is there a way to make the labels appear on alternating sides of the funnel? for example one label to the left of it, the other to the right, and so on?

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
Answer this question...

×   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...
×
×
  • Create New...