-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
We have users experiencing this issue on the cloud. Example dashboard:
{"config":{"layout":"30-30-40"},"columns":[[{"uniqueId":"widgetVisitsSummarygetEvolutionGraphforceView1viewDataTablegraphEvolution","parameters":{"forceView":"1","viewDataTable":"graphEvolution","module":"VisitsSummary","action":"getEvolutionGraph","widget":1,"columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false},{"uniqueId":"widgetVisitsSummarygetforceView1viewDataTablesparklines","parameters":{"forceView":"1","viewDataTable":"sparklines","module":"VisitsSummary","action":"get","widget":1},"isHidden":false}],[{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension1","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"1","widget":1,"viewDataTable":"graphPie","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false},{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension2","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"2","widget":1,"viewDataTable":"graphPie","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false},{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension4","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"4","widget":1,"viewDataTable":"graphPie","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false}],[{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension3","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"3","widget":1,"viewDataTable":"graphVerticalBar","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false},{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension5","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"5","widget":1,"viewDataTable":"graphVerticalBar","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false}]]}
As you can see it uses unique visitors which a user chose for example while selecting the day period. But then when switching to "Range" period for example, the widgets render an empty/broken widget and the whole UI is basically broken afterwards.
This is because there are rows for the data table, but there is no entry for the unique visitors (I think). Therefore there is no this.data[0].length
in
index.php?module=Proxy&action=getCoreJs&cb=52c065e5d0f32ad90504d57b7b3f5e72:formatted:57479 Uncaught TypeError: Cannot read property 'length' of undefined
at exports.JqplotBarGraphDataTable._setJqplotParameters (VM1264 index.php:formatted:1)
at exports.JqplotBarGraphDataTable.init (VM1264 index.php:formatted:1)
at exports.JqplotBarGraphDataTable.DataTable (VM1264 index.php:formatted:1)
at exports.JqplotBarGraphDataTable.exports.JqplotGraphDataTable (VM1264 index.php:formatted:1)
at new exports.JqplotBarGraphDataTable (VM1264 index.php:formatted:1)
at HTMLDivElement.<anonymous> (VM1264 index.php:formatted:1)
at Function.each (VM1264 index.php:formatted:1)
at n.fn.init.each (VM1264 index.php:formatted:1)
at Function.DataTable.initNewDataTables (VM1264 index.php:formatted:1)
at HTMLDocument.eval (eval at globalEval (VM1264 index.php:formatted:1), <anonymous>:2:39)
There must be some code like here: https://github.com/matomo-org/matomo/blob/3.8.1/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php#L54-L58 that only adds data to the graph series when there is data for the specific metric.
When replacing all metrics with nb_visits
, then the dashobard renders nicely. Used are pie and bar charts for example. Ideally we would show instead "no data" message or make the visualisations work with no data.
This is what the dashboard looks like: