如何从Google可视化中心定位条形格式? [英] How do I center a Bar Format from Google Visualization?

查看:163
本文介绍了如何从Google可视化中心定位条形格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是

解决方案

是,删除 float:left; 可以很好地工作。



参考您的问题如何在Google Visualization API的表格中居中数字?,解决方案很简单,如其中一个anwser所述。



您需要覆盖css由 span 标签的API继承。

  span {
float:none!important;
}

这里是它的小提琴: http://jsfiddle.net/a8e3re72/5/


This is a continuation of this question where I asked how to center a number (i.e. text return) from the Google Visualization API. The new issue I am having is that I want to show progress bars for a specific piece of data, and I would like to center them. I am using the Bar Format. However, my CSS does not seem to work. I know that I should be able to apply CSS to a specific tag within a named element (or I believe I can).

Here is picture of the current site:

I believe if I can remove float: left; as inherited from the google process and add margin: 0 auto; this will all work. Here is a JSFiddle of my work so far.

解决方案

Yes, removing the float:left; works well.

With reference to your question How do I center numbers in a table from Google Visualization API?, the solution is simple as stated in one of its anwser.

You need to overwrite the css inherited by the API for the span tag inside the td.

span{
    float:none !important;
}

Here's the fiddle for it: http://jsfiddle.net/a8e3re72/5/

这篇关于如何从Google可视化中心定位条形格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆