zend framework - Kendo UI: error when executing the controller -
i error:unexpected character in input: '\' (ascii=92) state=1 when executing controller using kendo ui generate graphs & containing syntax this: $valueaxis = new \kendo\dataviz\ui\chartvalueaxisitem(); found s php version error, versions lower 5.3 doesn t support namespaces, m running php 5.4 zend framework 1.12.3 & still have error.
controller:
class statscontroller extends oft_controller_action { function init () { require_once 'library/kendo/autoload.php'; } public function indexaction(){ $india = new \kendo\dataviz\ui\chartseriesitem(); $india->name('india') ->data(array(3.907, 7.943, 7.848, 9.284, 9.263, 9.801, 3.890, 8.238, 9.552, 6.855)); $valueaxis = new \kendo\dataviz\ui\chartvalueaxisitem(); $valueaxis->labels(array('format' => '{0}%')) ->line(array('visible' => false)) ->axiscrossingvalue(-10); $categoryaxis = new \kendo\dataviz\ui\chartcategoryaxisitem(); $categoryaxis->categories(array(2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011)) ->majorgridlines(array('visible' => false)); $tooltip = new \kendo\dataviz\ui\charttooltip(); $tooltip->visible(true) ->format('{0}%') ->template('#= series.name #: #= value #'); $chart = new \kendo\dataviz\ui\chart('chart'); $chart->title(array('text' => 'gross domestic product growth /gdp annual %/')) ->legend(array('position' => 'bottom')) ->addseriesitem($india) ->addvalueaxisitem($valueaxis) ->addcategoryaxisitem($categoryaxis) ->tooltip($tooltip) ->seriesdefaults(array('type' => 'line')); echo $chart->render(); } } thank help
which version of php on server?
the basic requirements kendo ui php wrappers 4.3.
try out!
Comments
Post a Comment