Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to override "Project" label in Pie Chart #37

Closed
GoogleCodeExporter opened this issue Aug 25, 2015 · 6 comments
Closed

No way to override "Project" label in Pie Chart #37

GoogleCodeExporter opened this issue Aug 25, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Modified ChartDemo's BudgetPieChart.java to change data legend title
   from "Project" to "Events".

2. The legend shows "Project-1 ... n, no matter what title you use in the 
   call to buildCategoryDataset at line 55.


What is the expected output? I expect to be able to change the legend with
the dataset values.

What do you see instead? The legend for the data series is always "Project-1 .. 
n.

Please provide a source code snippet that we can use to replicate the issue.

Line 55 was:
  return ChartFactory.getPieChartIntent(context, buildCategoryDataset("Project budget", values), renderer);


I changed to:
    return ChartFactory.getPieChartIntent(context, buildCategoryDataset("Events Percent", values), renderer);


What version of the product binary library are you using?
0.5.0

Please provide any additional information below.



Original issue reported on code.google.com by Ben.F...@gmail.com on 9 Jan 2011 at 4:31

@GoogleCodeExporter
Copy link
Author

The legend labels are provided by the series category.
Take a look at BudgetPieChart. In the execute() method, the 
buildCategoryDataset() located in the super-class is called. In that method, 
several values are added to a CategorySeries.
In the series.add("Label", value), the first argument is the label for a 
specific item in the legend.


Original comment by dandrome...@gmail.com on 9 Jan 2011 at 10:31

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

[deleted comment]

3 similar comments
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

The first argument in buildCategorySeries() is not used by the legend.

Original comment by dandrome...@gmail.com on 9 Jan 2011 at 10:36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant