Open crashkonijn opened 9 years ago
Hi Peter,
Thanks for the suggestion. It's currently not support to draw several websites on the ImageGraph but for sure it would be a nice new feature!
@crashkonijn @mattab , I am working in this issue to make sure that the image graph render for multiple sites as comma separated values as well as 'idSite=all'. Please stay tuned for its availability.
Awesome, thankyou!
The only difference with what I expected to get was that I assumed to get back one image with multiple sites shown on it. (Very handy for an overview of all sites). But this will do for now.
Thanks again!
@mattab Generally speaking, image graph generation is a kind of memory and time consuming task and so having the facility to view all idSite's graph in one page is a very nice feature. But the concern may be that if the user manages more than 10 or 20 sites, it will take huge amount of time for graph generation. It may even cause script execution time out. So do we may need to limit the number of image graphs generated even if idSite=all is set? If so, I assume setting the limit to either 10 or 15 consolidated image graphs per user would be reasonable. What do you think? do we need to have limits here?
@saleemkce I've got no idea how long the generation of such image is, but I'd assume that more then 5-10 in one image wouldn't work anyway. If a person has more then the maximum amount of websites, what would you suggest happens then?
I think you could ether return more images or return just the maximum, however if I send for id=all I'd expect them all to be returned. As well as when I ask for an img that I get one, not a bunch of them. (this would break my code at least)
Is there a way to detect the amount of time a script took and stop it just before the maximum? Because it differs per server how much sites you would be able to handle before going over the limit right?
@crashkonijn, @mattab
@saleemkce @mattab
I would suggest the following:
I do agree with testing what the right maximum amount would be. However a huge piwik database on a slow server could also collapse with one server, and a heavy server with a lot of smaller piwik databases might just do just fine generating an image (I suppose). Would it be possible to create a setting for this and create an error log message if the requested image is probably taking to much time? This could warn a developer to change his or her code to request only a couple sites at the time. Leave the developers that use this option with some responsibility :)
Hello,
I was trying to get an image graph of all my websites at once, and this gave me the following error: (this is from piwik's own demo site)
http://demo.piwik.org/index.php?module=API&method=ImageGraph.get&idSite=all&apiModule=VisitsSummary&apiAction=get&token_auth=anonymous&graphType=evolution&period=day&date=previous30&width=500&height=250
The same happens if I try to set idSite to multiple id's.
Is there another way to achieve this?
Kind regards,
Peter Klooster