Jump to content
JChartFX Community
  • 0

Datagrid in Funnels reorder the labels


Go to solution Solved by JuanC,

Question

I wish to use a funnel to represent sales activity, and display a datagrid instead of a legend box.  I would use .getPointLabels(), but the values sometimes overwrite each other on the graph.

 

When I add the datagrid, the labels somehow get swapped/reordered so that the data no longer matches the label.

 

I've attached a screenshot to demonstrate...

 

using the funnel example at:  

 

var funnel = new cfx.funnel.Funnel();
chart1.setGalleryAttributes(funnel);
funnel.setTipHeight(10);
 
var data = chart1.getData();
data.setSeries(1);
data.setPoints(5);
chart1.getLegendBox().setDock(cfx.DockArea.Right);
 
chart1.getAllSeries().getPointLabels().setVisible(true);
 
data.setItem(0,0,780);
data.setItem(0,1,1462);
data.setItem(0,2,2465);
data.setItem(0,3,6242);
data.setItem(0,4,15230);
 
data.getLabels().setItem(0,"Renewals");
data.getLabels().setItem(1,"Purchases");
data.getLabels().setItem(2,"Quotes");
data.getLabels().setItem(3,"Downloads");
data.getLabels().setItem(4,"Visitors");
 
chart1.getDataGrid().setDock(cfx.DockArea.Right);
chart1.getDataGrid().setVisible(true);
 
chart1.getAxisY().getLabelsFormat().setFormat(cfx.AxisFormat.Currency);
 
 
 
 
 

post-47297-0-22713600-1426530200_thumb.jpg

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
  • Solution

You are correct, there is an issue because Funnel charts will sort the values before painting but the data grid is currently not aware of the reordering. We will try to fix this in future builds.

 

I am not entirely sure why you would want to show the point labels, the legend box and the data grid as you are showing the same information in 3 different ways.

 

Regards,

 

JuanC

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
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...