I am encountering an issue:
My table contains charts and tables that are displayed correctly in browsers. However, when I attempt to print it (as a PDF) in Mozilla Firefox, the third speedometer gets cut off, showing only 2.5 speedometers.
Using the "shrink to fit" option does not solve the problem. If the scale is at 100%, the issue persists. When scaled down to 70% or less, all three speedometers are visible, but other text becomes too small. Other tables and content adjust perfectly based on the scale. Is there a solution to this problem? I specifically need it to work in FireFox, but I also tested it in Chrome where it auto-scales to about 70%.
Is there a way to scale the charts when printing? Setting a specific pixel size for the chart would not be ideal for my situation.
Here is the link to the speedometer table of charts
I suspect the issue lies in the fact that JavaScript runs only once during page rendering and then does not scale afterward.
The CSS stylesheet:
.container
{
width: 33%;
border: 0px solid black;
}
.speedometer
{
width: 80%;
margin-left: auto;
margin-right: auto;
}
And the HTML file (JavaScript can be found in the link):
<table class="speedometer" >
<tr>
<td id="container" style= "width: 33%; height: 33%"></td>
<td id="container1" style= "width: 33%; height: 33%"></td>
<td id="container2" style= "width: 33%; height: 33%"></td>
</tr>
<tr></tr>
<td class="container">
<table class="speedometer_tables">
<tr>
<td align=center bgcolor="DDDFFF">
<B>1</B>
</td>
<td align=center bgcolor="DDDFFF">
From(h:mm)
</td>
<td align=center bgcolor="DDDFFF">
Up to(h:mm)
</td>
</tr>
<tr>
<td align=center bgcolor="55BF3B">
<B>Ideal</B>
</td>
<td align=center>
0:00
</td>
<td align=center>
01:00
</td>
</tr>
<tr>
<td align=center bgcolor="DDDF0D">
<B>Optimal</B>
</td>
<td align=center>
01:00
</td>
<td align=center>
02:00
</td>
</tr>
<tr>
<td align=center bgcolor="DF5353">
<B>Critical</B>
</td>
<td align=center>
02:00
</td>
<td align=center>
03:00
</td>
</tr>
</table>
</td>
<td class="container">
<table class="speedometer_tables">
<tr>
<td align=center bgcolor="DDDFFF">
<B>2</B>
</td>
<td align=center bgcolor="DDDFFF">
From(h:mm)
</td>
<td align=center bgcolor="DDDFFF">
Up to(h:mm)
</td>
</tr>
<tr>
<td align=center bgcolor="55BF3B">
<B>Ideal</B>
</td>
<td align=center>
0:00
</td>
<td align=center>
100:00
</td>
</tr>
<tr>
<td align=center bgcolor="DDDF0D">
<B>Optimal</B>
</td>
<td align=center>
100:00
</td>
<td align=center>
200:00
</td>
</tr>
<tr>
<td align=center bgcolor="DF5353">
<B>Critical</B>
</td>
<td align=center>
200:00
</td>
<td align=center>
300:00
</td>
</tr>
</table>
</td>
<td class="container">
<table class="speedometr_tables">
<tr>
<td align=center bgcolor="DDDFFF">
<B>3</B>
</td>
<td align=center bgcolor="DDDFFF">
From(h:mm)
</td>
<td align=center bgcolor="DDDFFF">
Up to(h:mm)
</td>
</tr>
<tr>
<td align=center bgcolor="55BF3B">
<B>Ideal</B>
</td>
<td align=center>
0:00
</td>
<td align=center>
100:00
</td>
</tr>
<tr>
<td align=center bgcolor="DDDF0D">
<B>Optimal</B>
</td>
<td align=center>
100:00
</td>
<td align=center>
200:00
</td>
</tr>
<tr>
<td align=center bgcolor="DF5353">
<B>Critical</B>
</td>
<td align=center>
200:00
</td>
<td align=center>
300:00
</td>
</tr>
</table>
</td>
</table>