我尝试将<google-chart>
放入聚合物<paper-drawer-panel>
,但图表未显示。
我不知道我做错了什么,因为如果我尝试将图表放在没有聚合物<paper-drawer-panel>
的情况下,图表会出现。
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Google Charts in Polymer</title>
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<link rel="import" href="bower_components/google-chart/google-chart.html">
</head>
<body unresolved class="fullbleed layout vertical">
<template>
<paper-drawer-panel id="paperDrawerPanel" force-narrow>
<paper-scroll-header-panel drawer fixed>
<paper-toolbar id="drawerToolbar">
<span class="paper-font-title">Menu</span>
</paper-toolbar>
<!-- Drawer Content -->
<paper-menu class="list" attr-for-selected="data-route" selected="[[route]]">
<a href="../#!/home">
<iron-icon icon="home"></iron-icon>
<span>Inicio</span>
</a>
<a href="../#!/menu1">
<iron-icon icon="shopping-basket"></iron-icon>
<span>Menu 1</span>
</a>
<a href="../#!/menu2">
<iron-icon icon="shopping-cart"></iron-icon>
<span>Menu 2</span>
</a>
<a href="../#!/menu-3">
<iron-icon icon="view-quilt"></iron-icon>
<span>Menu 3</span>
</a>
</paper-menu>
</paper-scroll-header-panel>
<!-- Main Area -->
<paper-scroll-header-panel main condenses keep-condensed-header>
<!-- Main Toolbar -->
<paper-toolbar id="mainToolbar">
<paper-icon-button id="paperToggle" icon="menu" paper-drawer-toggle></paper-icon-button>
<span class="flex"></span>
<!-- Toolbar icons -->
<paper-icon-button icon="search"></paper-icon-button>
<paper-icon-button icon="account-circle"></paper-icon-button>
<!-- Application name -->
<div class="middle middle-container center horizontal layout">
<div class="app-name">Polymer Charts</div>
</div>
</paper-toolbar>
<div id="demo">
<h1>Material Design</h1>
<google-chart
type='pie'
options='{"title": "Distribution of days in 2001H1"}'
cols='[{"label": "Month", "type": "string"},{"label": "Days", "type": "number"}]'
rows='[["Jan", 31],["Feb", 28],["Mar", 31],["Apr", 30],["May", 31],["Jun", 30]]'>
</google-chart>
</div>
</paper-scroll-header-panel>
</paper-drawer-panel>
</template>
</body>
</html>
我尝试将<google-chart>
放入聚合物<paper-drawer-panel>
,但图表未显示。
我不知道我做错了什么,因为如果我尝试将图表放在没有聚合物<paper-drawer-panel>
的情况下,图表会出现。