1

I am using the Google Chart Tools module to create a pie chart of cricketers runs wagon wheel.

I am facing a problem with the creation of a pie chart for creation of wagon wheel. I have cricketer content type which has these fields:

  • Name
  • Mid-On-Score
  • Point score
  • Mid-off-score
  • Gully Score

Now I want to create a pie chart (i.e wagon wheel of scored runs by each individual cricketer). So that it shows me a pie chart which will have areawise score.

I have created a view for this and used Google Chart Tools trying to create a piechart for this. But it is not showing the pie chart correctly.

I have done correct configuration but the pie chart shows only first field in whole circle and other fields are not shown.

Here is an image with a Column chart:

Column chart with all values

And here is a similar image with a pie chart:

Pie chart with all values

In the above pie chart, it should show me colored regions (slices) but it's not showing.

What am I doing wrong or does pie chart not have such functionality?

Note: it is showing other charts correctly.

2 Answers 2

1

I had the issue - though not in drupal, but a native php application. While I've read that large differences in values can trigger the "other" slice, this was not the case in my application.

The datatable rendered perfectly as ColumnChart, but failed to show slices as PieChart and only came back with 100% "other". What resolved the issue for me was casting the values in php to integer with intval(). Apparently the CulumnChart visualization is forgiving, while the PieChart is not when it comes to values other than intergers. Hope that helps clarify.

0

This is a known (active) issue for the Google Chart Tools module, as described in issue #2077751.

In case it's an option to consider changing to an alternative module, then you may want to look at the Charts module as a possible alternative. For the Charts module, there is a similar issue (also because Charts is using the same Google Charts library as its renderer). However, comment #4 in it contains a patch that might be a good fit as a (temporary?) alternative. That issue also has some "child" issues that may help also.

Disclosure: I'm a co-maintainer of this module,
I hope this does not violate the site's policy on self-promotion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.