What @Bondye said.
Create a class similar to
@media print {
.unprintable {
visibility: hidden;
}
}
svg,
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<circle cx="50" cy="50" r="40" fill="red" />
<circle cx="150" cy="50" r="40" fill="red" />
<circle cx="50" cy="150" r="40" fill="blue" class="unprintable" />
<circle cx="150" cy="150" r="40" fill="red" />
</svg>
, .
http://jsfiddle.net/EqDGQ/
visibility: hidden; , display: none;.
EDITED
, Javascript .
hide(), . / hide(), , , . / hide().
, .unprintable. , .
, , JS, - : http://jsfiddle.net/EqDGQ/1/
$(function() {
$('svg circle[fill="blue"]').attr('class', 'unprintable');
});
----------------
!:)
JS- ( jQuery), .unprintable svg :
setUnprintableArea = function(id, xMin, yMin, xMax, yMax, rightAligned) {
if (rightAligned) {
svgWidth = $('#'+id+' .highcharts-container svg')[0].getBoundingClientRect().width;
xMin += svgWidth;
xMax += svgWidth;
}
$('#'+id+' .highcharts-container svg *').filter(function() {
rect = this.getBoundingClientRect();
return (xMin <= rect.left && rect.right <= xMax &&
yMin <= rect.top && rect.bottom <= yMax);
}).attr('class', 'unprintable');
};
:
setUnprintableArea('container', 15, 45, 240, 70);
setUnprintableArea('container', -55, 15, 0, 40, true);
setUnprintableArea('container', 0, 430, Number.MAX_VALUE, Number.MAX_VALUE);
-, , rightAligned true, y svg ( x = 0 ) xMin xMax .
: http://jsfiddle.net/DXYne/1/
?