fusioncharts同一页面显示2个仪表盘,且以java字符串作为xml数据
生活随笔
收集整理的這篇文章主要介紹了
fusioncharts同一页面显示2个仪表盘,且以java字符串作为xml数据
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
為什么80%的碼農都做不了架構師?>>> ??
fusioncharts同一頁面顯示2個儀表盤,且以java字符串作為xml數(shù)據
<%@ page contentType="text/html; charset=UTF-8" %> <%String path = request.getContextPath(); %> <%String xml = "<chart manageResize=\"1\" origW=\"350\" origH=\"200\" palette=\"2\" bgAlpha=\"0\" bgColor=\"FFFFFF\" lowerLimit=\"0\" upperLimit=\"100\" numberSuffix=\"%\" showBorder=\"0\" basefontColor=\"000000\" chartTopMargin=\"5\" chartBottomMargin=\"5\" caption=\"設備運行狀態(tài)實時監(jiān)控\" subCaption=\"xxxxd\" toolTipBgColor=\"009999\" gaugeFillMix=\"{dark-10},{light-70},{dark-10}\" gaugeFillRatio=\"3\" pivotRadius=\"8\" gaugeOuterRadius=\"120\" gaugeInnerRadius=\"70%\" gaugeOriginX=\"175\" gaugeOriginY=\"170\" trendValueDistance=\"5\" tickValueDistance=\"3\" manageValueOverlapping=\"1\" autoAlignTickValues=\"1\"> <colorRange> <color minValue=\"0\" maxValue=\"45\" code=\"FF654F\"/> <color minValue=\"45\" maxValue=\"80\" code=\"F6BD0F\"/> <color minValue=\"80\" maxValue=\"100\" code=\"8BBA00\"/> </colorRange> <dials> <dial value=\"72\" rearExtension=\"10\" baseWidth=\"10\"/> </dials> <trendpoints> <point startValue=\"62\" displayValue=\"平均值\" useMarker=\"1\" markerRadius=\"8\" dashed=\"1\" dashLen=\"2\" dashGap=\"2\" /> </trendpoints> <annotations> <annotationGroup id=\"Grp1\" showBelow=\"1\" showShadow=\"1\"> <annotation type=\"rectangle\" x=\"$chartStartX+5\" y=\"$chartStartY+5\" toX=\"$chartEndX-5\" toY=\"$chartEndY-5\" radius=\"10\" fillColor=\"009999,333333\" showBorder=\"0\" /> </annotationGroup> </annotations> <styles> <definition> <style name=\"RectShadow\" type=\"shadow\" strength=\"3\"/> <style name=\"trendvaluefont\" type=\"font\" bold=\"1\" borderColor=\"#00cccc\"/> </definition> <application> <apply toObject=\"Grp1\" styles=\"RectShadow\" /> <apply toObject=\"Trendvalues\" styles=\"trendvaluefont\" /> </application> </styles></chart>"; %> <HTML> <HEAD> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <TITLE>FusionCharts - Multiple Charts on one Page</TITLE> <SCRIPT LANGUAGE="Javascript" SRC="<%=path%>/frameworks/FusionCharts/FusionCharts.js"></SCRIPT> <script type="text/javascript"> var contextpath = "<%=path%>"; var xml = '<%=xml%>'; </script> <style type="text/css">body {font-family: Arial, Helvetica, sans-serif;font-size: 12px;} </style> </HEAD> <BODY> <div id="chartdiv1" align="center" class="text"> <script type="text/javascript">var myChart1 = new FusionCharts(contextpath+"/frameworks/FusionCharts/AngularGauge.swf", "myChartId1", "330", "300", "0", "0");myChart1.setDataXML(xml);myChart1.render("chartdiv1"); </script> <div id="chartdiv2" align="center" class="text"> <script type="text/javascript">var myChart2 = new FusionCharts(contextpath+"/frameworks/FusionCharts/AngularGauge.swf", "myChartId2", "330", "300", "0", "0");myChart2.setDataXML(xml);myChart2.render("chartdiv2"); </script> </BODY> </HTML>
轉載于:https://my.oschina.net/webas/blog/110622
總結
以上是生活随笔為你收集整理的fusioncharts同一页面显示2个仪表盘,且以java字符串作为xml数据的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mac中的放置java类库扩展的位置
- 下一篇: windows phone 8 的新特性