| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| Small charts using &page, but without legends. http://www.steveshipway.org/forum/viewtopic.php?f=15&t=4329 |
Page 1 of 1 |
| Author: | ffeijo [ Sat Apr 30, 2011 10:00 am ] |
| Post subject: | Small charts using &page, but without legends. |
We use the option &page=image to generate tables of charts for an html page. We are trying to generate smaller charts, and they work, but look ugly. The call looks something like this: http://172.16.32.7/?rtr=k-w-speed%2FBig ... ut-Metro-E That generates a chart, but an ugly one. It is visible here: http://screencast.com/t/Gyozizor I want to get rid of the legend, as you do for the summary pages. I looked all over your book - my constant companion Thanks is advance! |
|
| Author: | stevesh [ Thu May 05, 2011 5:45 pm ] |
| Post subject: | Re: Small charts using &page, but without legends. |
To get rid of the leged, append an 's' to the graph TYPE -- eg, 'xgtype=6s' (the 's' is for 'summary page type') If you want the image smaller, then use smaller STYLEs -- eg, 'xgstyle=n' or 'xgstyle=s' If you have the latest beta, there are some special undocumented style codes, like A and B for creating thumbnail graphs. |
|
| Author: | ffeijo [ Tue May 10, 2011 8:39 am ] |
| Post subject: | Re: Small charts using &page, but without legends. |
Thanks for answering, Steve. For some reason the 'xgtype=6s' statement is failing to suppress the legend. I pasted below the line I am using to create the chart, with the xgtype and xgstyle statements in the recommended format. This is the line used: SRC="http://172.16.32.7/?rtr=k-w-speed%2FBig-players-wan.cfg&xgtype=6s&xgstyle=s&if=Ken-MCC-Out-Metro-E&page=image " The chart generatedby the line above is still showing a legend, visible here: http://screencast.com/t/hQTNM2JQiR. Perhaps another statement is needed? Thanks for any help. |
|
| Author: | stevesh [ Tue May 10, 2011 10:40 am ] |
| Post subject: | Re: Small charts using &page, but without legends. |
Can you confirm which version of routers2 you are using? |
|
| Author: | ffeijo [ Wed May 11, 2011 1:30 am ] |
| Post subject: | Re: Small charts using &page, but without legends. |
| Author: | stevesh [ Wed May 11, 2011 1:04 pm ] |
| Post subject: | Re: Small charts using &page, but without legends. |
I see a bug. The definition of %gtypes in the start of routers2.cgi omits 6s (though it has ds, ws, etc) which means that routers2 will default to the first setting, '6'. Hence you lose the 's' option... To fix this, add '6s'=>'Compact 6 hour' in the %gtypes definitions, in 'sub initlabels' at the start of the routers2 script. Sorry for any confusion |
|
| Author: | ffeijo [ Wed May 11, 2011 2:03 pm ] |
| Post subject: | Re: Small charts using &page, but without legends. |
Thanks, Steve. After the addition of "6s" in the first line, here is what the code looks like now. The legend is still showing in the charts. Perhaps I messed something up, or there might be a need to edit some other place. sub initlabels { %gtypes = ( 6s=>"Compact 6 hour",d=>"Daily",w=>"Weekly", m=>"Monthly",y=>"Yearly", dwmy=>"All Graphs", dwmys=>"Compact", 6=>"6 hour", "m-"=>"Last Month", "w-"=>"Last week", "d-"=>"Yesterday", "y-"=>"Last Year", x1=>"X1", x2=>"X2", x3=>"X3", x4=>"X4", "dw"=>"Short term", "my"=>"Long term", ds=>"Compact daily", ws=>"Compact weekly", ms=>"Compact monthly", ys=>"Compact yearly", dm=>"Day+Month", wm=>"Week+Month", dy=>"Day+Year" ); |
|
| Author: | stevesh [ Wed May 11, 2011 3:15 pm ] |
| Post subject: | Re: Small charts using &page, but without legends. |
Ive been testing it here. A type of 'ds' works as expected. A type of '6s' reverts to displaying type 'd'; however, when I add the 6s type to the function as in my previous posting, it works as expected. Admittedly we're running v2.22beta1 but there are not any relevant changes that could affect this as far as I can see. Are you using something like mod_perl or speedyCGI where you need to restart Apache in order to pick up changes in the CGI script? |
|
| Author: | ffeijo [ Thu May 12, 2011 8:49 am ] |
| Post subject: | Re: Small charts using &page, but without legends. |
Problem solved. It is embarrassing to disclose the solution, but I must, if nothing else as penitence for taking the time of the last interaction away from you needlessly. It turns out that the server is using the windows MRTG bundle. So I was fixing a file named routers2.cgi, when the bundle renames the operative version of the file as index.cgi. I had to go to httpd.conf hunting for an accelerator, as you suggested on your last post. Instead I found the default settings for unamed access, and the penny dropped. Once I edited the proper file -that in the bundle is index.cgi- I was good to go. Big thanks for the help ! |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|