我见过一个 facebook 应用程序,其中单击一个单选按钮会呈现一个图表.
如下图所示:
我想知道是否有任何类似的图形库可以在 php 中生成相同的图形.
谢谢,
潘卡伊
实际上,生成这种图形很容易——只需使用两个 DIVs——一个是 100% 宽度的条,另一个DIV 是在第一个 DIV 中制作您需要的背景颜色 %.你甚至可以在其中包含文本.简单,只是简单的 HTML/CSS.
更新:
HTML:
CSS:
.bar { 宽度:99%;边框:1px 实心 #000;}.percentage { 背景:#000;}I have seen a facebook application in which clicking on a radio button renders a graph.
As you can see below:
I wanted to know whether there is any similar graph library through which i can generate the same graph in php.
Thanks,
Pankaj
actually, generating this kind of graph is pretty easy - just use two DIVs - one is a 100% width bar, another DIV is in that first DIV making background colored % you require. you can even include text in that. easy, just plain HTML/CSS.
UPDATE:
HTML:
<div class="bar">
<div class="percentage" style="width:66%">This is 66% wide div</div>
</div>
CSS:
.bar { width: 99%; border: 1px solid #000; }
.percentage { background: #000; }
这篇关于使用php的简单水平条形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在 PHP 上启用 SOAPenable SOAP on PHP(在 PHP 上启用 SOAP)
从 PHP SOAP 服务器获取接收到的 XMLGet received XML from PHP SOAP Server(从 PHP SOAP 服务器获取接收到的 XML)
不是有效的 AllXsd 值not a valid AllXsd value(不是有效的 AllXsd 值)
PHP SoapClient:SoapFault 异常无法连接到主机PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 异常无法连接到主机)
PHP中P_SHA1算法的实现Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的实现)
将字节数组从 PHP 发送到 WCFSending a byte array from PHP to WCF(将字节数组从 PHP 发送到 WCF)