Google图表图例无法正确显示 [英] Google Charts legend is not correctly displayed

查看:386
本文介绍了Google图表图例无法正确显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建google图表,我的图例不会折叠到页面中。

I am creating google chart and my legend is not being folded into pages.

我的代码就像

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script>
        google.load("visualization", "1.1", { packages: ["bar", "table"] });
        var chart;
        var table;
        var graphOptions = {
            title: 'Liczba ekspozycji w miesiącu',
            pointSize: 5,
            vAxis: { viewWindowMode: "explicit", viewWindow: { min: 0 } },
            height: '500'
        };
            $(function() {
                chart = new google.charts.Bar(document.getElementById('chart_div'));  
            });
            var maxGraphLines = 50;

            function refreshGraph(data) {
                chart.draw(dataTableForGrap, google.charts.Bar.convertOptions(graphOptions));
            }
        </script>

 <div id="chart_div" ></div>

,我得到的是:

,您可以看到传说一路下降,甚至在后面。他们应该被分页到页面,但这不会发生。任何帮助将不胜感激。谢谢。

as you can see the labels for legend are going all the way down even behind the div. They should be paged into pages but this does not happen. Any help will be appreciated. Thanks.

推荐答案

新的材质条形图不支持分页或滚动图例项目。在这之前,您可以尝试使用带有选项 {theme:'material'} 的核心图ColumnChart来获取材质颜色和字体。

The new "material" bar chart does not yet support paging or scrolling of legend items. Until it does, you might try using the corechart ColumnChart with the option { theme: 'material' } to get the material colors and fonts.

这篇关于Google图表图例无法正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆