Диаграмма Y столбца Google не отображается в Polymer 3 - PullRequest
0 голосов
/ 20 февраля 2020

Я очень новичок в Polymer. js и за последние 2 дня я пытаюсь реализовать гистограмму в Google. Я перепробовал много вещей, но это не работает. Пожалуйста, помогите.

Вот код:

import { PolymerElement, html } from "../../@polymer/polymer/polymer-element.js";
import { mixinBehaviors } from "../../@polymer/polymer/lib/legacy/class.js";
import '../../google-chart-polymer-3/google-chart.js';

 class wealthManagementTabsLanding extends mixinBehaviors([sbBehaviours.createTabs], PolymerElement) {
static get template() {
return html`
<style>
 :host {
 --google-chart-height: 200px;
 }
 google-chart {
 height: 200px;
 }
</style>
 <div class="mdl-grid" >
        <google-chart id="marketchart"
           options = '{
             "hAxis": { "title":""} ,
             "vAxis": {"title":"Percentage (%)","minValue": 0 ,"maxValue": 100,"format":"percent","ticks":[0,25,50,75,100]},
             "legend": "none",
             "colors": ["#81D4FD","#FFAB8F"],
             "bar": {"groupWidth" : "100em","groupHeight" : "600em"}
             }'  
           data='[["Category","Model","Custom"], 
             ["Equity", 50, 80], 
             ["Bonds", 20, 10], 
             ["Alternate", 10, 5], 
             ["Cash", 20, 5]]'

           ></google-chart>
 </div>
';}


 connectedCallback() {
   super.connectedCallback();
  } 
  }

Вывод:

enter image description here

Здесь график не отображает масштаб оси Y. пожалуйста, скажите мне, как я могу это исправить или я что-то пропустил. Спасибо.

...