Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
The quiz statistics gives us the graph which displays the results in the form of range i.e. 0-20%, 20-40% in 'X' axis. The image attached describes my requirement, I'm trying to achieve the same functionality for a custom view which displays statistics where the 'year' is on 'X' axis and some valid value on the 'Y' axis. I am trying to get the values for 'year' to display in ranges i.e. 2001-2002.
Can anyone help achieving the above functionality?
Comment | File | Size | Author |
---|---|---|---|
Range graph.png | 13.15 KB | shwethash |
Comments
Comment #1
Pierre.Vriens CreditAttribution: Pierre.Vriens commentedDid you ever find the answer / solution for this issue? If not please review the (new) documentation about Steps to create charts using the views UI, which includes this "Bonus tip": You may find it easier to start with a "Table" display and convert it to a chart display after setting up the data. It can be easier to visualize what the result of the chart will be if it's been laid out in a table first..
Please get back with a status update on this issue, OK?
Comment #2
Pierre.Vriens CreditAttribution: Pierre.Vriens commentedComment #3
shwethash CreditAttribution: shwethash commentedHi,
As i have shown in the uploaded picture, I may wish to add ranges to the graphs like 0-20%. 20-40% and so on...just like the quiz statistics module displays, but how to acheive it through a custom view?
Comment #4
Pierre.Vriens CreditAttribution: Pierre.Vriens commentedHi Shwetha, thanks for this extra info you provided. It helps to already get some meta-data about this issue corrected (as I do now), i.e. that this question is about the Views integration (not the Charts API).
But with the extra info in #3, I still don't have enough information about what you WANT to do (not just "may wish" I assume). After you answer these additional questions I might be able to actually find the real answer your are looking for:
Comment #5
shwethash CreditAttribution: shwethash commentedHi,
Sorry for entering the wrong title, I have added all the information below.
Comment #6
shwethash CreditAttribution: shwethash commentedHi,
1) The title seems to be fine now.
2) Here is my php code i.e. the export of my custom view.
3) Yes, I did mean the Quiz Stats submodule of the quiz module. I am refering the same module. It displays the ranges in 'X' axis as shown in the image uploaded in my previous comments, I would like to implement the same in my custom view.
Thank you.
Comment #7
Pierre.Vriens CreditAttribution: Pierre.Vriens commentedHi Shwetha, thanks for the extra info, and the exported view. We're getting closer, but I still cannot solve your request.
Here are additional questions for you:
... ['style_plugin'] = ...
. And the value of it is'chart';
. That implies to me that you should first try the "bonus tip" as mentioned in #1, i.e. (temporary) add another 'Table' display of the view. Doing so will help us narrow down your question to creating that table with some headers in that table that will become the labels of your chart later on. In doing so, I'm wondering if you should use something like rewrite results or something similar.Comment #8
shwethash CreditAttribution: shwethash commentedHi,
I have provided the details of my quiz module
Information added by Drupal.org packaging script on 2014-09-11
version = "7.x-5.0-alpha3+2-dev"
core = "7.x"
project = "quiz"
datestamp = "1410446360"
The range graph comes from the core 'quiz stats' module.
Comment #9
Pierre.Vriens CreditAttribution: Pierre.Vriens commentedHi Swetha (again),
I think in your last comment it should say " ... here are the details ..." instead of "... I have provided the details ...". Because I cannot find any such details in any prior comment in this issue (or am I missing something?).
Anyway, why are you still using an "alfa3" version of that module, which is from about 6 months ago? Is it possible for you to upgrade to the alfa9 version of that module, and then verify if this issue here is still unresolved? After you upgraded that module and confirmed that the issue here is still unresolved, I'd be happy to try to get it moving forward as suggested in my prior comment. However I hope you understand "I" consider it as a waste of time (for me) to go digging in an outdated alfa version of some other module ...
Regards, Pierre
PS: What about bullet "2." in my previous comment? Any progress on that (cfr the 'Bonus Tip')?
Comment #10
shwethash CreditAttribution: shwethash commentedHi,
Thank you for correcting the statements, I will update my quiz and try adding the chart display and see if it works.
Comment #11
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commented