Hi Martin

SVG likes to draw lines centered around the points, and this includes
borders of rectangles, which is what the chartArea border is.  I don't
think we do anything special with this 'stroke' to offset it as one might
expect, either to be all inside the chartArea or, probably better, all
outside.  It wouldn't be enough to change the order of drawing layers, or
even to change the clipPath to be inside the border, because charts will
end up drawing in this edge area as well, unaware of the border width.

The only way to affect the size of the area outside the chartArea is by
setting the chartArea top, left, right, bottom, height, and width options,
as well as the top-level height and width options.

On Sat, Apr 15, 2017 at 8:21 AM, Martin Underwood <
[email protected]> wrote:

> If you draw a chart and set
>
> chartArea: {backgroundColor: {stroke: 'black', strokeWidth: 10, fill:
> '#F0F0F0'}}}
>
> to draw a border around it, and then draw a graph where the hAxis doesn't
> start at 0 (eg between two dates), the hAxis.gridline seems to be drawn *after
> *and therefore *on top of* the chartArea border.
>
> This looks a bit messy. I first noticed it when the gridline was the
> default mid-grey and the border was 1 pixel wide: the border was then black
> at the top, right and bottom, but was grey on the left. In the example that
> I've attached, I've made the border 10 pixels wide and set the gridlines to
> red to show the problem more effectively.
>
> I wonder whether a solution would be to change the way the graph is draw
> in one of two ways:
>
> - draw the border after and on top of the axes and the data lines
>
> - draw gridlines only where they lie between the left and right borders of
> the graph, and not if they coincide with the borders
>
>
>
> By the way, is there a way of reducing the large amount of horizontal
> white space between the left and right vAxis titles and the numbers (eg 0,
> 10, 20) on those axes? I presume it's large to accommodate the possibility
> of the axis numbers being many digits in length
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to google-visualization-api@
> googlegroups.com.
> Visit this group at https://groups.google.com/
> group/google-visualization-api.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-visualization-api/9e24914b-3e04-4d4a-957b-
> e7854e740237%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/9e24914b-3e04-4d4a-957b-e7854e740237%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]>   5CC, Cambridge MA

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOcGAFRu3oK5a0p54h5kj_QrfOxvHSHqS_KBZVMLjjt%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to