i have a view for my custom module, where i have a numeric field. In order to use the Slider facet, the valueType for this field must be set to "number". For CCK fields the value type is set, as far as i can see, but non-cck fields not.

For me this hack works for now:

in file: views_plugin_style_exhibit_json.inc - add this lines at line 80

if ($field instanceof views_handler_field_numeric)
$props[$id]['valueType'] = 'number';

would be great if someone with more clue about this module could, enhance this solution (if needed) and provide a patch!

thank you very much!

have a nice day!
walter

Comments

diodata’s picture

+1

I've run into the same situation a few times. I also wonder if there's a way to define the field valuetype through the View UI. There are times when I've used CCK text fields for geographic coordinates, dates, and other non-string items.

jcamfield’s picture

+1 ; I can confirm this also works with Views 6.x-3.0-rc2.

You could also side-load a separate JSON file (stored on the webserver as a static file) to override/set data types (I've done this to add hierarchical sorting with taxonomy as per http://drupal.org/node/1887054)