0
我在Angular Material tabs内使用Google Geo chart。谷歌地理图表不呈现内角材料mdTabs
当您加载页面时,图表首次呈现良好状态,但当您更改页面并返回此页面时,它会显示容器错误,并且图表无法加载。
不幸的是不能复制这个错误,并编辑来解释这个错误。
有没有人知道此问题的任何修复?
我在Angular Material tabs内使用Google Geo chart。谷歌地理图表不呈现内角材料mdTabs
当您加载页面时,图表首次呈现良好状态,但当您更改页面并返回此页面时,它会显示容器错误,并且图表无法加载。
不幸的是不能复制这个错误,并编辑来解释这个错误。
有没有人知道此问题的任何修复?
使用该指令,也请确保您有图表加载最初,
var app = angular.module('app', ['ngMaterial', 'googlechart']);
app.controller('ChartController', function($scope) {
var chart1 = {};
chart1.type = "GeoChart";
chart1.data = [
['Locale', 'Count', 'Percent'],
['Germany', 22, 23],
['United States', 34, 11],
['Brazil', 42, 11],
['Canada', 57, 32],
['France', 6, 9],
['RU', 72, 3]
];
chart1.options = {
width: 600,
height: 300,
chartArea: {
left: 10,
top: 10,
bottom: 0,
height: "100%"
},
colorAxis: {
colors: ['#aec7e8', '#1f77b4']
},
displayMode: 'regions'
};
chart1.formatters = {
number: [{
columnNum: 1,
pattern: "$ #,##0.00"
}]
};
$scope.chart = chart1;
})