Config
Piwik\Plugins\CoreVisualizations\Visualizations\Sparklines\
Config
DataTable Visualization that derives from Sparklines.
Properties
This class defines the following properties:
$clientSidePropertiesash; The list of ViewDataTable properties that are 'Client Side Properties'. Inherited fromConfig$overridablePropertiesash; The list of ViewDataTable properties that can be overridden by query parameters. Inherited fromConfig$footer_iconsash; Controls what footer icons are displayed on the bottom left of the DataTable view. Inherited fromConfig$show_visualization_onlyash; Controls whether the buttons and UI controls around the visualization or shown or if just the visualization alone is shown. Inherited fromConfig$show_goalsash; Controls whether the goals footer icon is shown. Inherited fromConfig$show_insightsash; Controls whether the 'insights' footer icon is shown. Inherited fromConfig$translationsash; Array property mapping DataTable column names with their internationalized names. Inherited fromConfig$show_exclude_low_populationash; Controls whether the 'Exclude Low Population' option (visible in the popup that displays after clicking the 'cog' icon) is shown. Inherited fromConfig$show_flatten_tableash; Whether to show the 'Flatten' option (visible in the popup that displays after clicking the 'cog' icon). Inherited fromConfig$show_pivot_by_subtableash; Whether to show the 'Pivot by subtable' option (visible in the popup that displays after clicking the 'cog' icon). Inherited fromConfig$pivot_by_dimensionash; The ID of the dimension to pivot by when the 'pivot by subtable' option is clicked. Inherited fromConfig$pivot_by_columnash; The column to display in pivot tables. Inherited fromConfig$pivot_dimension_nameash; The human readable name of the pivot dimension. Inherited fromConfig$show_tableash; Controls whether the footer icon that allows users to switch to the 'normal' DataTable view is shown. Inherited fromConfig$show_table_all_columnsash; Controls whether the 'All Columns' footer icon is shown. Inherited fromConfig$show_table_performanceash; Controls whether the 'Performance columns' footer icon is shown (if available). Inherited fromConfig$show_footerash; Controls whether the entire view footer is shown. Inherited fromConfig$show_footer_iconsash; Controls whether the row that contains all footer icons & the limit selector is shown. Inherited fromConfig$columns_to_displayash; Array property that determines which columns will be shown. Inherited fromConfig$show_all_views_iconsash; Controls whether graph and non core viewDataTable footer icons are shown or not. Inherited fromConfig$selectable_columnsash; Array property that contains the names of columns that can be selected in the Series Picker. Inherited fromConfig$related_reportsash; Related reports are listed below a datatable view. Inherited fromConfig$related_reports_titleash; "Related Reports" is displayed by default before listing the Related reports, The string can be changed. Inherited fromConfig$titleash; The report title. Inherited fromConfig$title_edit_entity_urlash; If a URL is set, the title of the report will be clickable. Inherited fromConfig$descriptionash; The report description. Inherited fromConfig$show_related_reportsash; Controls whether a report's related reports are listed with the view or not. Inherited fromConfig$documentationash; Contains the documentation for a report. Inherited fromConfig$onlineGuideUrlash; URL linking to an online guide for this report (or plugin). Inherited fromConfig$custom_parametersash; Array property containing custom data to be saved in JSON in the data-params HTML attribute of a data table div. Inherited fromConfig$show_limit_controlash; Controls whether the limit dropdown (which allows users to change the number of data shown) is always shown or not. Inherited fromConfig$show_searchash; Controls whether the search box under the datatable is shown. Inherited fromConfig$show_periodsash; Controls whether the period selector under the datatable is shown. Inherited fromConfig$selectable_periodsash; Controls which periods can be selected when the period selector is enabled Inherited fromConfig$show_exportash; Controls whether the export feature under the datatable is shown. Inherited fromConfig$enable_sortash; Controls whether the user can sort DataTables by clicking on table column headings. Inherited fromConfig$show_bar_chartash; Controls whether the footer icon that allows users to view data as a bar chart is shown. Inherited fromConfig$show_pie_chartash; Controls whether the footer icon that allows users to view data as a pie chart is shown. Inherited fromConfig$show_tag_cloudash; Controls whether the footer icon that allows users to view data as a tag cloud is shown. Inherited fromConfig$show_as_content_blockash; If enabled, shows the visualization as a content block. Inherited fromConfig$show_titleash; If enabled shows the title of the report. Inherited fromConfig$show_export_as_rss_feedash; Controls whether the user is allowed to export data as an RSS feed or not. Inherited fromConfig$show_ecommerceash; Controls whether the 'Ecoommerce Orders'/'Abandoned Cart' footer icons are shown or not. Inherited fromConfig$show_header_messageash; Stores an HTML message (if any) to display above the datatable view. Inherited fromConfig$show_footer_messageash; Stores an HTML message (if any) to display under the datatable view. Inherited fromConfig$metrics_documentationash; Array property that stores documentation for individual metrics. Inherited fromConfig$tooltip_metadata_nameash; Row metadata name that contains the tooltip for the specific row. Inherited fromConfig$self_urlash; The URL to the report the view is displaying. Inherited fromConfig$datatable_css_classash; CSS class to use in the output HTML div. Inherited fromConfig$datatable_js_typeash; The JavaScript class to instantiate after the result HTML is obtained. Inherited fromConfig$search_recursiveash; If true, searching through the DataTable will search through all subtables. Inherited fromConfig$y_axis_unitash; The unit of the displayed column. Inherited fromConfig$show_export_as_image_iconash; Controls whether to show the 'Export as Image' footer icon. Inherited fromConfig$filtersash; Array of DataTable filters that should be run before displaying a DataTable. Inherited fromConfig$subtable_controller_actionash; Contains the controller action to call when requesting subtables of the current report. Inherited fromConfig$show_pagination_controlash; Controls whether the 'prev'/'next' links are shown in the DataTable footer. Inherited fromConfig$show_offset_informationash; Controls whether offset information (ie, '5-10 of 20') is shown under the datatable. Inherited fromConfig$hide_annotations_viewash; Controls whether annotations are shown or not. Inherited fromConfig$disable_all_rows_filter_limitash; Controls whether the 'all' row limit option is shown for the limit selector. Inherited fromConfig$max_export_filter_limitash; Sets a limit for the maximum number of rows that can be exported. Inherited fromConfig$no_data_messageash; Message to show if not data is available for the report Defaults toCoreHome_ThereIsNoDataForThisReportif not set Inherited fromConfig$datatable_actionsash; List of extra actions to display as icons in the datatable footer. Inherited fromConfig$segmented_visitor_log_segment_suffixInherited fromConfig$disable_comparisonash; Disable comparison support for this specific usage of a ViewDataTable. Inherited fromConfig$report_idInherited fromConfig$controllerNameInherited fromConfig$controllerActionInherited fromConfig
$clientSideProperties
The list of ViewDataTable properties that are 'Client Side Properties'.
Signature
- Its type is not specified.
$overridableProperties
The list of ViewDataTable properties that can be overridden by query parameters.
Signature
- Its type is not specified.
$footer_icons
Controls what footer icons are displayed on the bottom left of the DataTable view.
The value of this property must be an array of footer icon groups. Footer icon groups have set of properties, including an array of arrays describing footer icons. For example:
array(
array( // footer icon group 1
'class' => 'footerIconGroup1CssClass',
'buttons' => array(
'id' => 'myid',
'title' => 'My Tooltip',
'icon' => 'path/to/my/icon.png'
)
),
array( // footer icon group 2
'class' => 'footerIconGroup2CssClass',
'buttons' => array(...)
)
)
By default, when a user clicks on a footer icon, Matomo (formerly Piwik) will assume the 'id' is a viewDataTable ID and try to reload the DataTable w/ the new viewDataTable. You can provide your own footer icon behavior by adding an appropriate handler via DataTable.registerFooterIconHandler in your JavaScript code.
The default value of this property is not set here and will show the 'Normal Table' icon, the 'All Columns' icon, the 'Goals Columns' icon and all jqPlot graph columns, unless other properties tell the view to exclude them.
Signature
- Its type is not specified.
$show_visualization_only
Controls whether the buttons and UI controls around the visualization or shown or if just the visualization alone is shown.
Signature
- Its type is not specified.
$show_goals
Controls whether the goals footer icon is shown.
Signature
- Its type is not specified.
$show_insights
Controls whether the 'insights' footer icon is shown.
Signature
- Its type is not specified.
$translations
Array property mapping DataTable column names with their internationalized names.
The default value for this property is set elsewhere. It will contain translations of common metrics.
Signature
- Its type is not specified.
$show_exclude_low_population
Controls whether the 'Exclude Low Population' option (visible in the popup that displays after clicking the 'cog' icon) is shown.
Signature
- Its type is not specified.
$show_flatten_table
Whether to show the 'Flatten' option (visible in the popup that displays after clicking the 'cog' icon).
Signature
- Its type is not specified.
$show_pivot_by_subtable
Whether to show the 'Pivot by subtable' option (visible in the popup that displays after clicking the 'cog' icon).
Signature
- Its type is not specified.
$pivot_by_dimension
The ID of the dimension to pivot by when the 'pivot by subtable' option is clicked. Defaults to the subtable dimension of the report being displayed.
Signature
- Its type is not specified.
$pivot_by_column
The column to display in pivot tables. Defaults to the first non-label column if not specified.
Signature
- Its type is not specified.
$pivot_dimension_name
The human readable name of the pivot dimension.
Signature
- Its type is not specified.
$show_table
Controls whether the footer icon that allows users to switch to the 'normal' DataTable view is shown.
Signature
- Its type is not specified.
$show_table_all_columns
Controls whether the 'All Columns' footer icon is shown.
Signature
- Its type is not specified.
$show_table_performance
Controls whether the 'Performance columns' footer icon is shown (if available).
Signature
- Its type is not specified.
$show_footer
Controls whether the entire view footer is shown.
Signature
- Its type is not specified.
$show_footer_icons
Controls whether the row that contains all footer icons & the limit selector is shown.
Signature
- Its type is not specified.
$columns_to_display
Array property that determines which columns will be shown. Columns not in this array should not appear in ViewDataTable visualizations.
Example: array('label', 'nb_visits', 'nb_uniq_visitors')
If this value is empty it will be defaulted to array('label', 'nb_visits') or
array('label', 'nb_uniq_visitors') if the report contains a nb_uniq_visitors column
after data is loaded.
Signature
- Its type is not specified.
$show_all_views_icons
Controls whether graph and non core viewDataTable footer icons are shown or not.
Signature
- Its type is not specified.
$selectable_columns
Array property that contains the names of columns that can be selected in the Series Picker.
Default value: false
Signature
- Its type is not specified.
$related_reports
Related reports are listed below a datatable view. When clicked, the original report will change to the clicked report and the list will change so the original report can be navigated back to.
Signature
- Its type is not specified.
$related_reports_title
"Related Reports" is displayed by default before listing the Related reports, The string can be changed.
Signature
- Its type is not specified.
$title
The report title. Used with related reports so report headings can be changed when switching reports.
This must be set if related reports are added.
Signature
- Its type is not specified.
$title_edit_entity_url
If a URL is set, the title of the report will be clickable. Is supposed to be set for entities that can be configured (edited) such as goal. Eg when there is a goal report, and someone is allowed to edit the goal entity, a link is supposed to be with a URL to the edit goal form.
Signature
- It is a
stringvalue.
$description
The report description. eg like a goal description
Signature
- Its type is not specified.
$show_related_reports
Controls whether a report's related reports are listed with the view or not.
Signature
- Its type is not specified.
$documentation
Contains the documentation for a report.
Signature
- Its type is not specified.
$onlineGuideUrl
URL linking to an online guide for this report (or plugin).
Signature
- It is a
stringvalue.
$custom_parameters
Array property containing custom data to be saved in JSON in the data-params HTML attribute of a data table div. This data can be used by JavaScript DataTable classes.
e.g. array('typeReferrer' => ...)
It can then be accessed in the twig templates by clientSideParameters.typeReferrer
Signature
- Its type is not specified.
$show_limit_control
Controls whether the limit dropdown (which allows users to change the number of data shown) is always shown or not.
Normally shown only if pagination is enabled.
Signature
- Its type is not specified.
$show_search
Controls whether the search box under the datatable is shown.
Signature
- Its type is not specified.
$show_periods
Controls whether the period selector under the datatable is shown.
Signature
- Its type is not specified.
$selectable_periods
Controls which periods can be selected when the period selector is enabled
Signature
- Its type is not specified.
$show_export
Controls whether the export feature under the datatable is shown.
Signature
- Its type is not specified.
$enable_sort
Controls whether the user can sort DataTables by clicking on table column headings.
Signature
- Its type is not specified.
$show_bar_chart
Controls whether the footer icon that allows users to view data as a bar chart is shown.
Signature
- Its type is not specified.
$show_pie_chart
Controls whether the footer icon that allows users to view data as a pie chart is shown.
Signature
- Its type is not specified.
$show_tag_cloud
Controls whether the footer icon that allows users to view data as a tag cloud is shown.
Signature
- Its type is not specified.
$show_as_content_block
If enabled, shows the visualization as a content block. This is similar to wrapping your visualization
with a <ContentBlock/>
Signature
- It is a
boolvalue.
$show_title
If enabled shows the title of the report.
Signature
- It is a
boolvalue.
$show_export_as_rss_feed
Controls whether the user is allowed to export data as an RSS feed or not.
Signature
- Its type is not specified.
$show_ecommerce
Controls whether the 'Ecoommerce Orders'/'Abandoned Cart' footer icons are shown or not.
Signature
- Its type is not specified.
$show_header_message
Stores an HTML message (if any) to display above the datatable view.
Attention: Message will be printed raw. Don't forget to escape where needed!
Signature
- Its type is not specified.
$show_footer_message
Stores an HTML message (if any) to display under the datatable view.
Attention: Message will be printed raw. Don't forget to escape where needed!
Signature
- Its type is not specified.
$metrics_documentation
Array property that stores documentation for individual metrics.
E.g. array('nb_visits' => '...', ...)
By default this is set to values retrieved from report metadata (via API.getReportMetadata API method).
Signature
- Its type is not specified.
$tooltip_metadata_name
Row metadata name that contains the tooltip for the specific row.
Signature
- Its type is not specified.
$self_url
The URL to the report the view is displaying. Modifying this means clicking back to this report from a Related Report will go to a different URL. Can be used to load an entire page instead of a single report when going back to the original report.
The URL used to request the report without generic filters.
Signature
- Its type is not specified.
$datatable_css_class
CSS class to use in the output HTML div. This is added in addition to the visualization CSS class.
Signature
- Its type is not specified.
$datatable_js_type
The JavaScript class to instantiate after the result HTML is obtained. This class handles all interactive behavior for the DataTable view.
Signature
- Its type is not specified.
$search_recursive
If true, searching through the DataTable will search through all subtables.
Signature
- Its type is not specified.
$y_axis_unit
The unit of the displayed column. Valid if only one non-label column is displayed.
Signature
- Its type is not specified.
$show_export_as_image_icon
Controls whether to show the 'Export as Image' footer icon.
Signature
- Its type is not specified.
$filters
Array of DataTable filters that should be run before displaying a DataTable. Elements of this array can either be a closure or an array with at most three elements, including: - the filter name (or a closure) - an array of filter parameters - a boolean indicating if the filter is a priority filter or not
Priority filters are run before queued filters. These filters should be filters that add/delete rows.
If a closure is used, the view is appended as a parameter.
Signature
- Its type is not specified.
$subtable_controller_action
Contains the controller action to call when requesting subtables of the current report.
By default, this is set to the controller action used to request the report.
Signature
- Its type is not specified.
$show_pagination_control
Controls whether the 'prev'/'next' links are shown in the DataTable footer. These links change the 'filter_offset' query parameter, thus allowing pagination.
Signature
- Its type is not specified.
$show_offset_information
Controls whether offset information (ie, '5-10 of 20') is shown under the datatable.
Signature
- Its type is not specified.
$hide_annotations_view
Controls whether annotations are shown or not.
Signature
- Its type is not specified.
$disable_all_rows_filter_limit
Controls whether the 'all' row limit option is shown for the limit selector.
Signature
- It is a
boolvalue.
$max_export_filter_limit
Sets a limit for the maximum number of rows that can be exported.
Signature
- It is a
intvalue.
$no_data_message
Message to show if not data is available for the report
Defaults to CoreHome_ThereIsNoDataForThisReport if not set
Attention: Message will be printed raw. Don't forget to escape where needed!
Signature
- It is a
stringvalue.
$datatable_actions
List of extra actions to display as icons in the datatable footer.
Not API yet.
Signature
- It is a
arrayvalue.
$segmented_visitor_log_segment_suffix
Signature
- Its type is not specified.
$disable_comparison
Disable comparison support for this specific usage of a ViewDataTable.
Signature
- It is a
boolvalue.
$report_id
Signature
- Its type is not specified.
$controllerName
Signature
- Its type is not specified.
$controllerAction
Signature
- Its type is not specified.
Methods
The class defines the following methods:
__construct()ash; Constructor. Inherited fromConfigaddPropertiesThatShouldBeAvailableClientSide()ash; Marks display properties as client side properties. Inherited fromConfigaddPropertiesThatCanBeOverwrittenByQueryParams()ash; Marks display properties as overridable. Inherited fromConfiggetProperties()ash; Returns array of all property values in this config object. Inherited fromConfigremoveColumnToDisplay()Inherited fromConfiggetPriorityFilters()Inherited fromConfiggetPresentationFilters()Inherited fromConfigsetSecondaryDimensions()ash; Sets secondary dimensions for the current report. Inherited fromConfigaddRelatedReport()ash; Adds a related report to the $related_reports property. Inherited fromConfigaddRelatedReports()ash; Adds several related reports to the $related_reports property. Inherited fromConfigaddTranslation()ash; Associates internationalized text with a metric. Inherited fromConfigaddTranslations()ash; Associates multiple translations with metrics. Inherited fromConfigdisablePivotBySubtableIfTableHasNoSubtables()Inherited fromConfig
__construct()
Constructor.
Signature
addPropertiesThatShouldBeAvailableClientSide()
Marks display properties as client side properties. Read this to learn more.
Signature
- It accepts the following parameter(s):
$propertyNames(array) — List of property names, eg,array('show_limit_control', 'show_goals').
- It does not return anything or a mixed result.
addPropertiesThatCanBeOverwrittenByQueryParams()
Marks display properties as overridable. Read this to learn more.
Signature
- It accepts the following parameter(s):
$propertyNames(array) — List of property names, eg,array('show_limit_control', 'show_goals').
- It does not return anything or a mixed result.
getProperties()
Returns array of all property values in this config object. Property values are mapped by name.
Signature
- Returns:
array— eg,array('show_limit_control' => 0, 'show_goals' => 1, ...)
removeColumnToDisplay()
Signature
It accepts the following parameter(s):
$columnToRemove
It does not return anything or a mixed result.
getPriorityFilters()
Signature
- It does not return anything or a mixed result.
getPresentationFilters()
Signature
- It does not return anything or a mixed result.
setSecondaryDimensions()
Sets secondary dimensions for the current report. This will make the related reports to display secondary dimension reports.
This requires the API to be able to handle the secondaryDimension parameter.
The properties $related_reports and $related_reports_title will be overwritten for this purpose.
Signature
It accepts the following parameter(s):
$dimensions(array) —$defaultDimension(string) —
It returns a
voidvalue.
addRelatedReport()
Adds a related report to the $related_reports property. If the report references the one that is currently being displayed, it will not be added to the related report list.
Signature
- It accepts the following parameter(s):
$relatedReport(string) — The plugin and method of the report, eg,'DevicesDetection.getBrowsers'.$title(string) — The report's display name, eg,'Browsers'.$queryParams(array) — Any extra query parameters to set in related report's URL, eg,array('idGoal' => 'ecommerceOrder').
- It does not return anything or a mixed result.
addRelatedReports()
Adds several related reports to the $related_reports property. If any of the reports references the report that is currently being displayed, it will not be added to the list. All other reports will still be added though.
If you need to make sure the related report URL has some extra query parameters, use addRelatedReport().
Signature
- It accepts the following parameter(s):
$relatedReports(array) — Array mapping report IDs with their internationalized display titles, eg,array( 'DevicesDetection.getBrowsers' => 'Browsers', 'Resolution.getConfiguration' => 'Configurations' )
- It does not return anything or a mixed result.
addTranslation()
Associates internationalized text with a metric. Overwrites existing mappings.
See $translations.
Signature
- It accepts the following parameter(s):
$columnName(string) — The name of a column in the report data, eg,'nb_visits'or'goal_1_nb_conversions'.$translation(string) — The internationalized text, eg,'Visits'or"Conversions for 'My Goal'".
- It does not return anything or a mixed result.
addTranslations()
Associates multiple translations with metrics.
See $translations and addTranslation().
Signature
- It accepts the following parameter(s):
$translations(array) — An array of column name => text mappings, eg,array( 'nb_visits' => 'Visits', 'goal_1_nb_conversions' => "Conversions for 'My Goal'" )
- It does not return anything or a mixed result.
disablePivotBySubtableIfTableHasNoSubtables()
Signature
It accepts the following parameter(s):
$table(DataTable) —
It does not return anything or a mixed result.