0
我使用來自here的angular-google-chart來顯示谷歌條形圖的示例如下。正如你可以從下面的圖片看到的,我的標籤,傳說是部分隱藏的。如何顯示全文?如何防止在谷歌圖表上切斷圖例?
下面是代碼:
angular.module("google-chart-sample", ["googlechart", "googlechart-docs"])
.controller("GenericChartCtrl", function ($scope) {
$scope.chartObject = {};
$scope.chartObject.type = "BarChart";
$scope.onions = [
{v: "Onions"},
{v: 3},
];
$scope.chartObject.data = {"cols": [
{id: "t", label: "Topping", type: "string"},
{id: "s", label: "Slices", type: "number"}
], "rows": [
{c: [
{v: "Mushrooms"},
{v: 3},
]},
{c: $scope.onions},
{c: [
{v: "Olives"},
{v: 31}
]},
{c: [
{v: "Zucchini"},
{v: 1},
]},
{c: [
{v: "Pepperoni"},
{v: 2},
]}
]};
$scope.chartObject.options = {
'title': 'How Much Pizza I Ate Last Night'
};
});