谷歌图表controlwrapper

时间:2016-08-11 16:28:26

标签: google-visualization controls wrapper

我想改变控件的高度,但它不会起作用。

这是我到目前为止所尝试的:

   var control = new google.visualization.ControlWrapper({
        controlType: 'ChartRangeFilter',
        containerId: 'control_div',
        height: 55,   //placing it here is not working
        options: {
            filterColumnIndex: 0,
            height: 55, //neither does it here
            ui: {
              labelStacking: 'vertical',
              chartType: 'LineChart',
              snapToData: true,
              height: 55, //or here
            },
        }
    }); 

我的代码出了什么问题?

1 个答案:

答案 0 :(得分:1)

它应该在这里 - > options.ui.chartOptions.height

options: {
  ui: {
    chartOptions: {
      height: 55
    }
  }
}

ui用于控件,chartOptions用于显示的图表