0

在这个 jsBin 中,我试图google-chart通过从此处的文档页面复制粘贴第一个示例来显示一个元素。但图表不显示。

谁能确认或拒绝我的假设,即垃圾箱无法正常工作的原因是由于polygit2.appspot.com上的类似临时 服务器问题(类似于两天前的这种情况)?还是代码有问题需要修复?

http://jsbin.com/dusaqaqaje/edit?html,控制台,输出
<!doctype html>
<head>
  <meta charset="utf-8">
  <!---- >
  <base href="https://polygit.org/components/">
  <!---- >
  Toggle below/above as backup when server is down
  <!---->
  <base href="https://polygit2.appspot.com/components/">
  <!---->
  <script src="webcomponentsjs/webcomponents-lite.min.js"></script>
  <link href="polymer/polymer.html" rel="import">
  <link href="paper-button/paper-button.html" rel="import">
  <link href="google-chart/google-chart.html" rel="import">
</head>
<body>

<dom-module id="x-element">

<template>
  <style></style>

<paper-button on-tap="_handleTap">Click Me</paper-button>

<!---- >
  Below is just a copypaste from the docs page here:
  https://elements.polymer-project.org/elements/google-chart
<!---->
<google-chart
  type='pie'
  options='{"title": "Distribution of days in 2001Q1"}'
  cols='[{"label":"Month", "type":"string"}, {"label":"Days", "type":"number"}]'
  rows='[["Jan", 31],["Feb", 28],["Mar", 31]]'>
</google-chart>

</template>

<script>
  (function(){
    Polymer({
      is: "x-element",
      properties: {
      },
      _handleTap: function() {
        console.log('You clicked me!');
      },
    });
  })();
</script>

</dom-module>

<x-element></x-element>

</body>
4

1 回答 1

1

正如您已经提出的那样,我认为这是一个临时的服务器问题。通过 polygit导入此google-chart元素只会引发错误,而不是提供该元素(您可能会在导入链接中看到此行为)。

希望这将很快得到解决。

于 2016-03-03T11:03:30.937 回答