diff options
20 files changed, 146 insertions, 79 deletions
diff --git a/core/DataTableVisualization.php b/core/DataTableVisualization.php index e70099ff03..f51d95b690 100644 --- a/core/DataTableVisualization.php +++ b/core/DataTableVisualization.php @@ -54,14 +54,14 @@ abstract class DataTableVisualization if (isset(static::$clientSideParameters)) { $result = array(); - $lineage = static::getThisVisualizationClassLineage(); + $lineage = static::getVisualizationClassLineage(get_called_class()); foreach ($lineage as $klass) { if (isset($klass::$clientSideParameters)) { - $result = array_merge($result, $clientSideParameters); + $result = array_merge($result, $klass::$clientSideParameters); } } - return $result; + return array_unique($result); } else { return array(); } @@ -82,14 +82,14 @@ abstract class DataTableVisualization if (isset(static::$clientSideProperties)) { $result = array(); - $lineage = static::getThisVisualizationClassLineage(); + $lineage = static::getVisualizationClassLineage(get_called_class()); foreach ($lineage as $klass) { if (isset($klass::$clientSideProperties)) { - $result = array_merge($result, $clientSideProperties); + $result = array_merge($result, $klass::$clientSideProperties); } } - return $result; + return array_unique($result); } else { return array(); } @@ -131,18 +131,6 @@ abstract class DataTableVisualization } /** - * Returns the class lineage for this class. For use with late static bindings. - * - * @see self::getVisualizationClassLineage - * - * @return array - */ - protected static function getThisVisualizationClassLineage() - { - return self::getVisualizationClassLineage(__CLASS__); - } - - /** * Returns the viewDataTable IDs of a visualization's class lineage. * * @see self::getVisualizationClassLineage @@ -152,7 +140,12 @@ abstract class DataTableVisualization public static function getVisualizationIdsWithInheritance($klass) { $klasses = self::getVisualizationClassLineage($klass); - return array_map(array('Piwik\\Piwik', 'getUnnamespacedClassName'), $klasses); + + $result = array(); + foreach ($klasses as $klass) { + $result[] = $klass::getViewDataTableId(); + } + return $result; } /** diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index 952feab283..39fe5996dd 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -128,15 +128,16 @@ class ViewDataTable $visualizationClass = $visualizationId ? DataTableVisualization::getClassFromId($visualizationId) : null; $this->visualizationClass = $visualizationClass; + list($currentControllerName, $currentControllerAction) = explode('.', $currentControllerAction); + $this->currentControllerName = $currentControllerName; + $this->currentControllerAction = $currentControllerAction; + $this->viewProperties['visualization_properties'] = new VisualizationPropertiesProxy($visualizationClass); $this->viewProperties['metadata'] = array(); $this->viewProperties['translations'] = array(); $this->viewProperties['filters'] = array(); $this->viewProperties['related_reports'] = array(); - - list($currentControllerName, $currentControllerAction) = explode('.', $currentControllerAction); - $this->currentControllerName = $currentControllerName; - $this->currentControllerAction = $currentControllerAction; + $this->viewProperties['subtable_controller_action'] = $currentControllerAction; $this->setDefaultProperties(); @@ -172,6 +173,16 @@ class ViewDataTable } /** + * Returns the view's associated visualization class name. + * + * @return string + */ + public function getVisualizationClass() + { + return $this->visualizationClass; + } + + /** * Gets a view property by reference. * * @param string $name A valid view property name. @see Properties for all @@ -268,8 +279,8 @@ class ViewDataTable 'show_table_all_columns', 'show_all_views_icons', 'show_active_view_icon', - 'show_barchart', - 'show_piechart', + 'show_bar_chart', + 'show_pie_chart', 'show_tag_cloud', 'show_export_as_image_icon', 'show_export_as_rss_feed', @@ -279,6 +290,7 @@ class ViewDataTable 'show_footer', 'show_related_reports', 'keep_summary_row', + 'subtable_controller_action', ); if ($this->visualizationClass) { @@ -753,10 +765,13 @@ class ViewDataTable // for example setExcludeLowPopulation // we go through all the $this->viewProperties array and set the variables not set yet foreach ($this->getClientSideParameters() as $name) { - if (!isset($javascriptVariablesToSet[$name]) - && !empty($this->viewProperties[$name]) - ) { - $javascriptVariablesToSet[$name] = $this->viewProperties[$name]; + if (!isset($javascriptVariablesToSet[$name])) { + if (!empty($this->viewProperties[$name])) { + $javascriptVariablesToSet[$name] = $this->convertForJson($this->viewProperties[$name]); + } else if (Properties::isValidVisualizationProperty($this->visualizationClass, $name)) { + $javascriptVariablesToSet[$name] = + $this->convertForJson($this->viewProperties['visualization_properties']->$name); + } } } @@ -775,7 +790,6 @@ class ViewDataTable if (!isset($javascriptVariablesToSet['viewDataTable'])) { $javascriptVariablesToSet['viewDataTable'] = $this->getViewDataTableId(); } - $javascriptVariablesToSet['controllerActionCalledWhenRequestSubTable'] = $this->viewProperties['subtable_controller_action']; if ($this->dataTable && // Set doesn't have the method @@ -815,14 +829,19 @@ class ViewDataTable } /** - * TODO + * Returns array of properties that should be visible to client side JavaScript. The data + * will be available in the data-props HTML attribute of the .dataTable div. + * + * @return array Maps property names w/ property values. */ private function getClientSidePropertiesToSet() { $result = array(); foreach ($this->getClientSideProperties() as $name) { if (isset($this->viewProperties[$name])) { - $result[$name] = $this->viewProperties[$name]; + $result[$name] = $this->convertForJson($this->viewProperties[$name]); + } else if (Properties::isValidVisualizationProperty($this->visualizationClass, $name)) { + $result[$name] = $this->convertForJson($this->viewProperties['visualization_properties']->$name); } } return $result; @@ -1040,7 +1059,7 @@ class ViewDataTable $this->viewProperties['show_goals'] = false; } - if ($this->viewProperties['filter_limit'] == 0) { // TODO: should be possible to set limit to 0 (for whatever reason) + if ($this->viewProperties['filter_limit'] == 0) { $this->viewProperties['filter_limit'] = false; } } @@ -1116,4 +1135,9 @@ class ViewDataTable $visualizationClass = $this->visualizationClass; $this->setViewProperties($visualizationClass::getDefaultPropertyValues()); } + + private function convertForJson($value) + { + return is_bool($value) ? (int)$value : $value; + } }
\ No newline at end of file diff --git a/core/ViewDataTable/Properties.php b/core/ViewDataTable/Properties.php index 457069dbb7..b0001be374 100644 --- a/core/ViewDataTable/Properties.php +++ b/core/ViewDataTable/Properties.php @@ -448,6 +448,15 @@ class Properties } /** + * Returns true if $name is a valid visualization property for the given visualization class. + */ + public static function isValidVisualizationProperty($visualizationClass, $name) + { + $properties = self::getVisualizationProperties($visualizationClass); + return isset($properties[$name]); + } + + /** * Checks if a property is a valid ViewDataTable property, and if not, throws an exception. * * @param string $name The property name. @@ -470,8 +479,7 @@ class Properties */ public static function checkValidVisualizationProperty($visualizationClass, $name) { - $properties = self::getVisualizationProperties($visualizationClass); - if (!isset($properties[$name])) { + if (!self::isValidVisualizationProperty($visualizationClass, $name)) { throw new Exception("Invalid Visualization display property '$name' for '$visualizationClass'."); } } @@ -527,7 +535,6 @@ class Properties ), 'request_parameters_to_modify' => array(), 'documentation' => false, - 'subtable_controller_action' => false, 'datatable_css_class' => false, 'filters' => array(), 'hide_annotations_view' => true, diff --git a/core/ViewDataTable/VisualizationPropertiesProxy.php b/core/ViewDataTable/VisualizationPropertiesProxy.php index 6a39bf8a4d..8930cb9696 100644 --- a/core/ViewDataTable/VisualizationPropertiesProxy.php +++ b/core/ViewDataTable/VisualizationPropertiesProxy.php @@ -83,4 +83,23 @@ class VisualizationPropertiesProxy return $this->visualizationProperties[$name] = $value; } + + /** + * Sets a visualization property, but only if the visualization is an instance of a + * certain class. + * + * @param string $forClass The visualization class to check for. + * @param string $name A valid property name for the current visualization. + * @param mixed $value + * @return mixed Returns $value. + * @throws \Exception if the property name is invalid. + */ + public function setForVisualization($forClass, $name, $value) + { + if ($forClass == $this->visualizationClass + || is_subclass_of($this->visualizationClass, $forClass) + ) { + return $this->__set($name, $value); + } + } }
\ No newline at end of file diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php index 20b3985e14..b97895ed7d 100644 --- a/plugins/Actions/Actions.php +++ b/plugins/Actions/Actions.php @@ -654,7 +654,7 @@ class Piwik_Actions extends Plugin private function addBaseDisplayProperties(&$result) { $result['datatable_js_type'] = 'actionDataTable'; - $result['visualization_properties']['HtmlTable']['subtable_template'] = + $result['visualization_properties']['table']['subtable_template'] = '@CoreHome/_dataTableActions_subDataTable.twig'; $result['search_recursive'] = true; $result['show_all_views_icons'] = false; @@ -666,7 +666,7 @@ class Piwik_Actions extends Plugin $result['custom_parameters'] = array('flat' => 0); if (ViewDataTable::shouldLoadExpanded()) { - $result['visualization_properties']['HtmlTable']['show_expanded'] = true; + $result['visualization_properties']['table']['show_expanded'] = true; $result['filters'][] = function ($dataTable) { Piwik_Actions::setDataTableRowLevels($dataTable); @@ -879,7 +879,7 @@ class Piwik_Actions extends Plugin 'show_table_all_columns' => false, 'show_bar_chart' => false, 'visualization_properties' => array( - 'HtmlTable' => array( + 'table' => array( 'disable_row_evolution' => false, ) ) diff --git a/plugins/CoreHome/javascripts/datatable.js b/plugins/CoreHome/javascripts/datatable.js index 6d35f66367..acbb96e7ef 100644 --- a/plugins/CoreHome/javascripts/datatable.js +++ b/plugins/CoreHome/javascripts/datatable.js @@ -1191,7 +1191,7 @@ dataTable.prototype = self.param.enable_filter_excludelowpop = filtersToRestore.enable_filter_excludelowpop; self.param.idSubtable = idSubTable; - self.param.action = self.param.controllerActionCalledWhenRequestSubTable; + self.param.action = self.props.subtable_controller_action; delete self.param.totalRows; @@ -1427,8 +1427,8 @@ dataTable.prototype = doHandleRowActions: function (trs) { var self = this; - var availableActionsForReport = DataTable_RowActions_Registry - .getAvailableActionsForReport(self.param); + var merged = $.extend({}, self.param, self.props); + var availableActionsForReport = DataTable_RowActions_Registry.getAvailableActionsForReport(merged); if (availableActionsForReport.length == 0) { return; @@ -1759,7 +1759,7 @@ actionDataTable.prototype = this.param['enable_filter_excludelowpop'] = filtersToRestore['enable_filter_excludelowpop']; self.param.idSubtable = idSubTable; - self.param.action = self.param.controllerActionCalledWhenRequestSubTable; + self.param.action = self.props.subtable_controller_action; self.reloadAjaxDataTable(false, function (resp) { self.actionsSubDataTableLoaded(resp, idSubTable); diff --git a/plugins/CoreHome/javascripts/sparkline.js b/plugins/CoreHome/javascripts/sparkline.js index 6093955eeb..222e44e490 100644 --- a/plugins/CoreHome/javascripts/sparkline.js +++ b/plugins/CoreHome/javascripts/sparkline.js @@ -62,7 +62,7 @@ window.initializeSparklines = function () { // if this happens, we can't find the graph using $('#'+idDataTable+"Chart"); // instead, we just use the first evolution graph we can find. if (dataTable.length == 0) { - dataTable = $('div.dataTableEvolutionGraph'); + dataTable = $('div.dataTableVizEvolution'); } // reload the datatable w/ a new column & scroll to the graph diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable.php b/plugins/CoreVisualizations/Visualizations/HtmlTable.php index 8fd87fc638..d3c6a61974 100644 --- a/plugins/CoreVisualizations/Visualizations/HtmlTable.php +++ b/plugins/CoreVisualizations/Visualizations/HtmlTable.php @@ -45,6 +45,12 @@ class HtmlTable extends DataTableVisualization const SHOW_EXPANDED = 'show_expanded'; /** + * When showing an expanded datatable, this property controls whether rows with subtables are + * replaced with their subtables, or if they are shown alongside their subtables. + */ + const REPLACE_ROW_WITH_SUBTABLE = 'replace_row_with_subtable'; + + /** * Controls whether any DataTable Row Action icons are shown. If true, no icons are shown. * * @see also self::DISABLE_ROW_EVOLUTION @@ -132,12 +138,14 @@ class HtmlTable extends DataTableVisualization 'datatable_js_type' => 'dataTable', 'filter_limit' => Config::getInstance()->General['datatable_default_limit'], 'visualization_properties' => array( - 'disable_row_evolution' => false, - 'disable_row_actions' => false, - 'subtable_template' => "@CoreHome/_dataTable.twig", - 'show_extra_columns' => false, - 'show_goals_columns' => false, - 'disable_subtable_when_show_goals' => false, + 'table' => array( + 'disable_row_evolution' => false, + 'disable_row_actions' => false, + 'subtable_template' => "@CoreHome/_dataTable.twig", + 'show_extra_columns' => false, + 'show_goals_columns' => false, + 'disable_subtable_when_show_goals' => false, + ), ), ); diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph.php index 8ed5f24840..fb0bc2fd3f 100644 --- a/plugins/CoreVisualizations/Visualizations/JqplotGraph.php +++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph.php @@ -27,6 +27,7 @@ require_once PIWIK_INCLUDE_PATH . '/plugins/CoreVisualizations/Visualizations/Jq class JqplotGraph extends DataTableVisualization { const DEFAULT_GRAPH_HEIGHT = 250; + const ID = 'jqplot_graph'; /** * Whether the series picker should allow picking more than one series or not. @@ -154,7 +155,7 @@ class JqplotGraph extends DataTableVisualization 'row_picker_match_rows_by' => false, 'row_picker_visible_rows' => array(), 'visualization_properties' => array( - 'JqplotGraph' => array( + 'jqplot_graph' => array( 'add_total_row' => 0, 'show_all_ticks' => false, 'allow_multi_select_series_picker' => true, diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Bar.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Bar.php index dffe7393f2..4ec94329e2 100644 --- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Bar.php +++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Bar.php @@ -24,7 +24,7 @@ class Bar extends JqplotGraph public static function getDefaultPropertyValues() { $result = parent::getDefaultPropertyValues(); - $result['visualization_properties']['max_graph_elements'] = 6; + $result['visualization_properties']['jqplot_graph']['max_graph_elements'] = 6; return $result; } diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php index 684b3fb524..f403684834 100644 --- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php +++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php @@ -50,7 +50,7 @@ class Evolution extends JqplotGraph $result['show_table'] = false; $result['show_table_all_columns'] = false; $result['hide_annotations_view'] = false; - $result['visualization_properties']['Evolution']['graph_height'] = self::GRAPH_HEIGHT . 'px'; + $result['visualization_properties']['graphEvolution']['graph_height'] = self::GRAPH_HEIGHT . 'px'; return $result; } diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php index 8ca39659b1..a7f62e7dfd 100644 --- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php +++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php @@ -24,8 +24,8 @@ class Pie extends JqplotGraph public static function getDefaultPropertyValues() { $result = parent::getDefaultPropertyValues(); - $result['visualization_properties']['max_graph_elements'] = 6; - $result['visualization_properties']['allow_multi_select_series_picker'] = false; + $result['visualization_properties']['jqplot_graph']['max_graph_elements'] = 6; + $result['visualization_properties']['jqplot_graph']['allow_multi_select_series_picker'] = false; return $result; } diff --git a/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig b/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig index 1347218af0..a5ba98ac72 100644 --- a/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig +++ b/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig @@ -1,13 +1,20 @@ +{%- set subtablesAreDisabled = properties.visualization_properties.show_goals_columns|default(false) + and properties.visualization_properties.disable_subtable_when_show_goals|default(false) -%} <table cellspacing="0" class="dataTable"> {% include "@CoreHome/_dataTableHead.twig" %} <tbody> {% for rowId, row in dataTable.getRows() %} - {%- set rowHasSubtable = row.getIdSubDataTable() and properties.subtable_controller_action is not null -%} + {%- set rowHasSubtable = not subtablesAreDisabled and row.getIdSubDataTable() and properties.subtable_controller_action is not null -%} {%- set shouldHighlightRow = rowId == constant('Piwik\\DataTable::ID_SUMMARY_ROW') and properties.highlight_summary_row -%} - + {# display this row if it doesn't have a subtable or if we don't replace the row with the subtable #} - {% if not rowHasSubtable or not properties.visualization_properties.show_expanded|default(false) or not properties.replace_row_with_subtable|default(false) %} + {%- set showRow = subtablesAreDisabled + or not rowHasSubtable + or not properties.visualization_properties.show_expanded|default(false) + or not properties.visualization_properties.replace_row_with_subtable|default(false) -%} + + {% if showRow %} <tr {% if rowHasSubtable %}id="{{ row.getIdSubDataTable() }}"{% endif %} class="{{ row.getMetadata('css_class') }} {% if rowHasSubtable %}subDataTable{% endif %}{% if shouldHighlightRow %} highlight{% endif %}"> {% for column in properties.columns_to_display %} diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php index 593f2a9b64..630bf4fe57 100644 --- a/plugins/DBStats/DBStats.php +++ b/plugins/DBStats/DBStats.php @@ -105,7 +105,7 @@ class Piwik_DBStats extends Plugin $result['show_offset_information'] = false; $result['show_pagination_control'] = false; - $result['visualization_properties']['JqplotGraph']['show_all_ticks'] = true; + $result['visualization_properties']['jqplot_graph']['show_all_ticks'] = true; // translate the labels themselves $valueToTranslationStr = array( @@ -256,7 +256,7 @@ class Piwik_DBStats extends Plugin $properties['show_tag_cloud'] = false; $properties['show_table_all_columns'] = false; $properties['keep_summary_row'] = true; - $properties['visualization_properties']['HtmlTable']['disable_row_evolution'] = true; + $properties['visualization_properties']['table']['disable_row_evolution'] = true; $properties['translations'] = array( 'label' => Piwik_Translate('DBStats_Table'), 'year' => Piwik_Translate('CoreHome_PeriodYear'), diff --git a/plugins/ExampleUI/Controller.php b/plugins/ExampleUI/Controller.php index 1c35d6b498..5c6f27254c 100644 --- a/plugins/ExampleUI/Controller.php +++ b/plugins/ExampleUI/Controller.php @@ -25,12 +25,20 @@ class Piwik_ExampleUI_Controller extends Controller $view->translations['label'] = "Hour of day"; $view->filter_sort_column = 'label'; $view->filter_sort_order = 'asc'; - $view->visualization_properties->max_graph_elements = 24; $view->filter_limit = 24; $view->show_exclude_low_population = false; $view->show_table_all_columns = false; - $view->visualization_properties->disable_row_evolution = true; $view->y_axis_unit = '°C'; // useful if the user requests the bar graph + $view->visualization_properties->setForVisualization( + 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\HtmlTable', + 'disable_row_evolution', + true + ); + $view->visualization_properties->setForVisualization( + 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph', + 'max_graph_elements', + 24 + ); echo $view->render(); } diff --git a/plugins/Live/Live.php b/plugins/Live/Live.php index dc199fe9d5..e4c15c1ed7 100644 --- a/plugins/Live/Live.php +++ b/plugins/Live/Live.php @@ -83,7 +83,7 @@ class Piwik_Live extends Plugin 'pageUrlNotDefined' => Piwik_Translate('General_NotDefined', Piwik_Translate('Actions_ColumnPageURL')) ), 'visualization_properties' => array( - 'HtmlTable' => array( + 'table' => array( 'disable_row_actions' => true, ) ) diff --git a/plugins/Referers/Referers.php b/plugins/Referers/Referers.php index 36c4b85d08..cd8ce1844e 100644 --- a/plugins/Referers/Referers.php +++ b/plugins/Referers/Referers.php @@ -336,7 +336,7 @@ class Piwik_Referers extends Plugin 'filter_limit' => 10, 'translations' => array('label' => $labelColumnTitle), 'visualization_properties' => array( - 'HtmlTable' => array( + 'table' => array( 'disable_subtable_when_show_goals' => true, ) ), @@ -352,7 +352,7 @@ class Piwik_Referers extends Plugin 'show_goals' => true, 'filter_limit' => 20, 'visualization_properties' => array( - 'HtmlTable' => array( + 'table' => array( 'disable_row_actions' => true ) ), @@ -371,7 +371,7 @@ class Piwik_Referers extends Plugin 'show_goals' => true, 'filter_limit' => 25, 'visualization_properties' => array( - 'HtmlTable' => array( + 'table' => array( 'disable_subtable_when_show_goals' => true, ) ), @@ -397,7 +397,7 @@ class Piwik_Referers extends Plugin 'filter_limit' => 25, 'translations' => array('label' => Piwik_Translate('Referers_ColumnSearchEngine')), 'visualization_properties' => array( - 'HtmlTable' => array( + 'table' => array( 'disable_subtable_when_show_goals' => true, ) ), @@ -422,7 +422,7 @@ class Piwik_Referers extends Plugin 'filter_limit' => 25, 'translations' => array('label' => Piwik_Translate('Referers_ColumnWebsite')), 'visualization_properties' => array( - 'HtmlTable' => array( + 'table' => array( 'disable_subtable_when_show_goals' => true, ) ), @@ -439,7 +439,7 @@ class Piwik_Referers extends Plugin 'show_goals' => true, 'translations' => array('label' => Piwik_Translate('Referers_ColumnSocial')), 'visualization_properties' => array( - 'HtmlTable' => array( + 'table' => array( 'disable_subtable_when_show_goals' => true, ) ), diff --git a/plugins/UserSettings/UserSettings.php b/plugins/UserSettings/UserSettings.php index 5d82f05a25..46568956f9 100644 --- a/plugins/UserSettings/UserSettings.php +++ b/plugins/UserSettings/UserSettings.php @@ -228,7 +228,7 @@ class Piwik_UserSettings extends Plugin 'title' => Piwik_Translate('UserSettings_ColumnBrowserVersion'), 'related_reports' => $this->getBrowserRelatedReports() )); - $result['visualization_properties']['JqplotGraph']['max_graph_elements'] = 7; + $result['visualization_properties']['jqplot_graph']['max_graph_elements'] = 7; return $result; } @@ -239,7 +239,7 @@ class Piwik_UserSettings extends Plugin 'title' => Piwik_Translate('UserSettings_Browsers'), 'related_reports' => $this->getBrowserRelatedReports() )); - $result['visualization_properties']['JqplotGraph']['max_graph_elements'] = 7; + $result['visualization_properties']['jqplot_graph']['max_graph_elements'] = 7; return $result; } @@ -336,7 +336,7 @@ class Piwik_UserSettings extends Plugin 'show_exclude_low_population' => false, 'filter_limit' => 5, 'visualization_properties' => array( - 'JqplotGraph' => array( + 'jqplot_graph' => array( 'max_graph_elements' => 5 ) ) @@ -449,4 +449,4 @@ class Piwik_UserSettings extends Plugin $archiving->archivePeriod(); } } -} +}
\ No newline at end of file diff --git a/plugins/VisitTime/VisitTime.php b/plugins/VisitTime/VisitTime.php index 3273daf3ea..e9873ae05c 100644 --- a/plugins/VisitTime/VisitTime.php +++ b/plugins/VisitTime/VisitTime.php @@ -135,7 +135,7 @@ class Piwik_VisitTime extends Plugin 'translations' => array('label' => Piwik_Translate('VisitTime_ColumnServerTime')), 'request_parameters_to_modify' => array('hideFutureHoursWhenToday' => 1), 'visualization_properties' => array( - 'JqplotGraph' => array( + 'jqplot_graph' => array( 'max_graph_elements' => false, ) ) @@ -146,7 +146,7 @@ class Piwik_VisitTime extends Plugin 'title' => Piwik_Translate('VisitTime_ColumnLocalTime'), 'translations' => array('label' => Piwik_Translate('VisitTime_LocalTime')), 'visualization_properties' => array( - 'JqplotGraph' => array( + 'jqplot_graph' => array( 'max_graph_elements' => false, ) ) @@ -159,7 +159,7 @@ class Piwik_VisitTime extends Plugin Piwik_Translate('General_ReportGeneratedFrom', self::getDateRangeForFooterMessage()), 'translations' => array('label' => Piwik_Translate('VisitTime_DayOfWeek')), 'visualization_properties' => array( - 'JqplotGraph' => array( + 'jqplot_graph' => array( 'show_all_ticks' => true, 'max_graph_elements' => false, ) @@ -215,4 +215,4 @@ class Piwik_VisitTime extends Plugin } return $dateRange; } -} +}
\ No newline at end of file diff --git a/plugins/VisitorInterest/VisitorInterest.php b/plugins/VisitorInterest/VisitorInterest.php index 6ea2c4eb69..569d482480 100644 --- a/plugins/VisitorInterest/VisitorInterest.php +++ b/plugins/VisitorInterest/VisitorInterest.php @@ -173,7 +173,7 @@ class Piwik_VisitorInterest extends Plugin 'show_search' => false, 'show_table_all_columns' => false, 'visualization_properties' => array( - 'JqplotGraph' => array( + 'jqplot_graph' => array( 'max_graph_elements' => 10 ) ) @@ -194,7 +194,7 @@ class Piwik_VisitorInterest extends Plugin 'show_search' => false, 'show_table_all_columns' => false, 'visualization_properties' => array( - 'JqplotGraph' => array( + 'jqplot_graph' => array( 'max_graph_elements' => 10 ) ) |