Open Fensterbank opened 9 years ago
Hello. I don't know why no one has done this for so many years, but I found a method for adding this indicator to the chart (and any other available ones). This is most likely the wrong approach, but it works :) Actually, you only need to add one line
$response['metadata']['imageGraphUrl'] .= '&columns=nb_visits,nb_uniq_visitors';
at the end of the method
enrichProcessedReportIfVisitsSummaryExtendGet(&$response, $infos)
in file
../plugins/VisitsSummary/VisitsSummary.php
You can see what it looks like in my mini-plugin
Hi @kiber-io, thanks for figuring this out! If this works correctly (I haven't actually tested it), would you be willing to create a pull request for it? I believe the proper place to change the imageGraphUrl property would be in the plugins/VisitsSummary/Reports/Get.php
file by adding the following method:
protected function buildReportMetadata()
{
$reportMetadata = parent::buildReportMetadata();
$reportMetadata['imageGraphUrl'] = // ...
return $reportMetadata;
}
That should have the same effect (again, I haven't tested, just looked at the code a bit).
That should have the same effect
Unfortunately, no, at this stage the required key is not in the array
would you be willing to create a pull request for it?
I didn't do this, because it's hardcore and not everyone needs this indicator in the report
In the statistics section "Visits Summary" of a generated pdf report the unique visits are displayed in the table, but not in the graph. Only the amount of visits are contained in the graph.
It would be great, if the unique visits will be included in the graph as a particular line, like in my example picture: