Closed (fixed)
Project:
Views Charts
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
9 Jul 2009 at 16:14 UTC
Updated:
27 Mar 2011 at 19:55 UTC
Views custom field (VCF) allows one to reformat the dates to be compatible with charts, it also allows you to use a row number in the x axis and lastly would allow you to create a simple baseline in the graph, *IF* it worked with Views Charts.
When I try and use a value generate by VCF, all the data piles up inthe Y axis of the chart and I see some cryptic errors in the view like:
warning: max() [function.max]: Array must contain at least one element in /var/www/sparcs/sites/all/modules/charts_graphs/apis/charts_openflash/charts_openflash.class.inc on line 72.
warning: min() [function.min]: Array must contain at least one element in /var/www/sparcs/sites/all/modules/charts_graphs/apis/charts_openflash/charts_openflash.class.inc on line 74.
Filed this as a feature request.
Thanks
Franco
Comments
Comment #1
danieldd commentedI am using this module with views custom field.
So far it seems to work, but you need to use the latest dev version of Views Custom Field.
This has this patch included http://drupal.org/files/issues/views_customfield.sorting.patch, which seems to make the custom fields chartable in this module.
Comment #2
rsevero commentedMarking as fixed. Please reopen with new info if necessary.
Comment #4
orfalas commentedI have been trying this patch to sort results but was not rendering the code out of <? ?> tags and sometimes it is usefull
That's because this
- function render($values) {
+ function render_row($values) {
$d = $this->view->display[$this->view->current_display];
$field_handlers = $d->handler->handlers['field'];
foreach ($field_handlers as $h) {
Just leave render function and add render_row function as coded in the patch.
Great aportation. Thank you.
Comment #5
open social commentedNice!
Thanks with the dev version everything works as expected
Comment #6
darrellduane commentedThis is great news that I can include Custom PHP code to make my graphs appear now that I'm using the dev version of views_customfield. I'm amazed that it works both if I echo out the value or if I return the value within the Views_customfield PHP block.