ucharts.vue 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226
  1. <template>
  2. <view class="qiun-columns">
  3. <view class="qiun-padding" style="font-size: 32rpx;">
  4. <text>{{tips}}</text>
  5. </view>
  6. <view class="qiun-padding">
  7. <view class="qiun-tip" @tap="changeData()">更新柱状图数据</view>
  8. </view>
  9. <view class="qiun-title-bar" style="background-color: #E5FDC3;">
  10. <view class="qiun-title-dot-light">柱状图</view>
  11. </view>
  12. <view class="qiun-charts" style="background-color: #E5FDC3;">
  13. <!--#ifdef MP-ALIPAY -->
  14. <canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" style="background-color: #E5FDC3;" :width="cWidth*pixelRatio"
  15. :height="cHeight*pixelRatio" :style="{'width':cWidth+'px','height':cHeight+'px'}" @touchstart="touchIt($event,'canvasColumn')"></canvas>
  16. <!--#endif-->
  17. <!--#ifndef MP-ALIPAY -->
  18. <canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" style="background-color: #E5FDC3;" @touchstart="touchIt($event,'canvasColumn')"></canvas>
  19. <!--#endif-->
  20. </view>
  21. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  22. <view class="qiun-title-dot-light">温度计式图表</view>
  23. </view>
  24. <view class="qiun-charts">
  25. <!--#ifdef MP-ALIPAY -->
  26. <canvas canvas-id="canvasColumnMeter" id="canvasColumnMeter" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  27. :style="{'width':cWidth+'px','height':cHeight+'px'}" @touchstart="touchIt($event,'canvasColumnMeter')"></canvas>
  28. <!--#endif-->
  29. <!--#ifndef MP-ALIPAY -->
  30. <canvas canvas-id="canvasColumnMeter" id="canvasColumnMeter" class="charts" @touchstart="touchIt($event,'canvasColumnMeter')"></canvas>
  31. <!--#endif-->
  32. </view>
  33. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  34. <view class="qiun-title-dot-light">混合图(单坐标系支持画点、线、面、柱)</view>
  35. </view>
  36. <view class="qiun-charts">
  37. <!--#ifdef MP-ALIPAY -->
  38. <canvas canvas-id="canvasMix" id="canvasMix" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  39. :style="{'width':cWidth+'px','height':cHeight+'px'}" disable-scroll=true @touchstart="touchMix" @touchmove="moveMix"
  40. @touchend="touchEndMix"></canvas>
  41. <!--#endif-->
  42. <!--#ifndef MP-ALIPAY -->
  43. <canvas canvas-id="canvasMix" id="canvasMix" class="charts" disable-scroll=true @touchstart="touchMix" @touchmove="moveMix"
  44. @touchend="touchEndMix"></canvas>
  45. <!--#endif-->
  46. </view>
  47. <view class="qiun-bg-white qiun-title-bar qiun-common-mt qiun-rows">
  48. <view class="qiun-title-dot-light">K线图(蜡烛图)</view>
  49. </view>
  50. <view class="qiun-charts">
  51. <!--#ifdef MP-ALIPAY -->
  52. <canvas canvas-id="canvasCandle" id="canvasCandle" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  53. :style="{'width':cWidth+'px','height':cHeight+'px'}" disable-scroll=true @touchstart="touchCandle" @touchmove="moveCandle"
  54. @touchend="touchEndCandle"></canvas>
  55. <!-- 使用图表拖拽功能时,建议给canvas增加disable-scroll=true属性,在拖拽时禁止屏幕滚动 -->
  56. <!--#endif-->
  57. <!--#ifndef MP-ALIPAY -->
  58. <canvas canvas-id="canvasCandle" id="canvasCandle" class="charts" disable-scroll=true @touchstart="touchCandle"
  59. @touchmove="moveCandle" @touchend="touchEndCandle"></canvas>
  60. <!-- 使用图表拖拽功能时,建议给canvas增加disable-scroll=true属性,在拖拽时禁止屏幕滚动 -->
  61. <!--#endif-->
  62. </view>
  63. <view class="qiun-padding">
  64. <view class="qiun-tip" @tap="changeGaugeData()">更新仪表盘数据</view>
  65. </view>
  66. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  67. <view class="qiun-title-dot-light">仪表盘</view>
  68. </view>
  69. <view class="qiun-charts">
  70. <!--#ifdef MP-ALIPAY -->
  71. <canvas canvas-id="canvasGauge" id="canvasGauge" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  72. :style="{'width':cWidth+'px','height':cHeight+'px'}"></canvas>
  73. <!--#endif-->
  74. <!--#ifndef MP-ALIPAY -->
  75. <canvas canvas-id="canvasGauge" id="canvasGauge" class="charts"></canvas>
  76. <!--#endif-->
  77. </view>
  78. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  79. <view class="qiun-title-dot-light">圆弧进度图</view>
  80. </view>
  81. <view class="qiun-charts3">
  82. <!--#ifdef MP-ALIPAY -->
  83. <canvas canvas-id="canvasArcbar1" id="canvasArcbar1" class="charts3" :style="{'width':cWidth3*pixelRatio+'px','height':cHeight3*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth3*(pixelRatio-1)/2+'px','margin-top':-cHeight3*(pixelRatio-1)/2+'px'}"></canvas>
  84. <canvas canvas-id="canvasArcbar2" id="canvasArcbar2" class="charts3" :style="{'width':cWidth3*pixelRatio+'px','height':cHeight3*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':cWidth3-cWidth3*(pixelRatio-1)/2+'px','margin-top':-cHeight3*(pixelRatio-1)/2+'px'}"></canvas>
  85. <canvas canvas-id="canvasArcbar3" id="canvasArcbar3" class="charts3" :style="{'width':cWidth3*pixelRatio+'px','height':cHeight3*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':cWidth3*2-cWidth3*(pixelRatio-1)/2+'px','margin-top':-cHeight3*(pixelRatio-1)/2+'px'}"></canvas>
  86. <!--#endif-->
  87. <!--#ifndef MP-ALIPAY -->
  88. <canvas canvas-id="canvasArcbar1" id="canvasArcbar1" class="charts3"></canvas>
  89. <canvas canvas-id="canvasArcbar2" id="canvasArcbar2" class="charts3" style="margin-left: 250rpx;"></canvas>
  90. <canvas canvas-id="canvasArcbar3" id="canvasArcbar3" class="charts3" style="margin-left: 500rpx;"></canvas>
  91. <!--#endif-->
  92. </view>
  93. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  94. <view class="qiun-title-dot-light">漏斗图</view>
  95. </view>
  96. <view class="qiun-charts">
  97. <!--#ifdef MP-ALIPAY -->
  98. <canvas canvas-id="canvasFunnel" id="canvasFunnel" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  99. :style="{'width':cWidth+'px','height':cHeight+'px'}" @touchstart="touchPie($event,'canvasFunnel')"></canvas>
  100. <!--#endif-->
  101. <!--#ifndef MP-ALIPAY -->
  102. <canvas canvas-id="canvasFunnel" id="canvasFunnel" class="charts" @touchstart="touchPie($event,'canvasFunnel')"></canvas>
  103. <!--#endif-->
  104. </view>
  105. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  106. <view class="qiun-title-dot-light">折线图一(可横向拖拽带滚动条)</view>
  107. <!-- 使用图表拖拽功能时,建议给canvas增加disable-scroll=true属性,在拖拽时禁止屏幕滚动 -->
  108. </view>
  109. <view class="qiun-charts">
  110. <!--#ifdef MP-ALIPAY -->
  111. <canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  112. :style="{'width':cWidth+'px','height':cHeight+'px'}" disable-scroll=true @touchstart="touchLineA" @touchmove="moveLineA"
  113. @touchend="touchEndLineA"></canvas>
  114. <!-- 使用图表拖拽功能时,建议给canvas增加disable-scroll=true属性,在拖拽时禁止屏幕滚动 -->
  115. <!--#endif-->
  116. <!--#ifndef MP-ALIPAY -->
  117. <canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" disable-scroll=true @touchstart="touchLineA"
  118. @touchmove="moveLineA" @touchend="touchEndLineA"></canvas>
  119. <!-- 使用图表拖拽功能时,建议给canvas增加disable-scroll=true属性,在拖拽时禁止屏幕滚动 -->
  120. <!--#endif-->
  121. </view>
  122. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  123. <view class="qiun-title-dot-light">折线图二(横屏图表)</view>
  124. </view>
  125. <view class="qiun-charts-rotate">
  126. <!--#ifdef MP-ALIPAY -->
  127. <canvas canvas-id="canvasLineB" id="canvasLineB" class="charts-rotate" :style="{'width':cWidth2*pixelRatio+'px','height':cHeight2*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth2*(pixelRatio-1)/2+'px','margin-top':-cHeight2*(pixelRatio-1)/2+'px'}"
  128. @touchstart="touchIt($event,'canvasLineB')"></canvas>
  129. <!--#endif-->
  130. <!--#ifndef MP-ALIPAY -->
  131. <canvas canvas-id="canvasLineB" id="canvasLineB" class="charts-rotate" @touchstart="touchIt($event,'canvasLineB')"></canvas>
  132. <!--#endif-->
  133. </view>
  134. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  135. <view class="qiun-title-dot-light">区域图</view>
  136. </view>
  137. <view class="qiun-charts">
  138. <!--#ifdef MP-ALIPAY -->
  139. <canvas canvas-id="canvasArea" id="canvasArea" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  140. :style="{'width':cWidth+'px','height':cHeight+'px'}" @touchstart="touchIt($event,'canvasArea')"></canvas>
  141. <!--#endif-->
  142. <!--#ifndef MP-ALIPAY -->
  143. <canvas canvas-id="canvasArea" id="canvasArea" class="charts" @touchstart="touchIt($event,'canvasArea')"></canvas>
  144. <!--#endif-->
  145. </view>
  146. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  147. <view class="qiun-title-dot-light">饼状图</view>
  148. </view>
  149. <view class="qiun-charts">
  150. <!--#ifdef MP-ALIPAY -->
  151. <canvas canvas-id="canvasPie" id="canvasPie" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  152. :style="{'width':cWidth+'px','height':cHeight+'px'}" @touchstart="touchPie($event,'canvasPie')"></canvas>
  153. <!--#endif-->
  154. <!--#ifndef MP-ALIPAY -->
  155. <canvas canvas-id="canvasPie" id="canvasPie" class="charts" @touchstart="touchPie($event,'canvasPie')"></canvas>
  156. <!--#endif-->
  157. </view>
  158. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  159. <view class="qiun-title-dot-light">环形图</view>
  160. </view>
  161. <view class="qiun-charts">
  162. <!--#ifdef MP-ALIPAY -->
  163. <canvas canvas-id="canvasRing" id="canvasRing" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  164. :style="{'width':cWidth+'px','height':cHeight+'px'}" @touchstart="touchPie($event,'canvasRing')"></canvas>
  165. <!--#endif-->
  166. <!--#ifndef MP-ALIPAY -->
  167. <canvas canvas-id="canvasRing" id="canvasRing" class="charts" @touchstart="touchPie($event,'canvasRing')"></canvas>
  168. <!--#endif-->
  169. </view>
  170. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  171. <view class="qiun-title-dot-light">雷达图</view>
  172. </view>
  173. <view class="qiun-charts">
  174. <!--#ifdef MP-ALIPAY -->
  175. <canvas canvas-id="canvasRadar" id="canvasRadar" class="charts" :width="cWidth*pixelRatio" :height="cHeight*pixelRatio"
  176. :style="{'width':cWidth+'px','height':cHeight+'px'}" @touchstart="touchPie($event,'canvasRadar')"></canvas>
  177. <!--#endif-->
  178. <!--#ifndef MP-ALIPAY -->
  179. <canvas canvas-id="canvasRadar" id="canvasRadar" class="charts" @touchstart="touchPie($event,'canvasRadar')"></canvas>
  180. <!--#endif-->
  181. </view>
  182. </view>
  183. </template>
  184. <script>
  185. import uCharts from '../../../components/u-charts/u-charts.js';
  186. var _self;
  187. var canvasObj = {};
  188. export default {
  189. data() {
  190. return {
  191. cWidth: '',
  192. cHeight: '',
  193. cWidth2: '', //横屏图表
  194. cHeight2: '', //横屏图表
  195. cWidth3: '', //圆弧进度图
  196. cHeight3: '', //圆弧进度图
  197. arcbarWidth: '', //圆弧进度图,进度条宽度,此设置可使各端宽度一致
  198. gaugeWidth: '', //仪表盘宽度,此设置可使各端宽度一致
  199. tips: '',
  200. pixelRatio: 1,
  201. serverData: '',
  202. itemCount: 30, //x轴单屏数据密度
  203. sliderMax: 50
  204. }
  205. },
  206. onLoad() {
  207. _self = this;
  208. //#ifdef MP-ALIPAY
  209. uni.getSystemInfo({
  210. success: function(res) {
  211. if (res.pixelRatio > 1) {
  212. //正常这里给2就行,如果pixelRatio=3性能会降低一点
  213. //_self.pixelRatio =res.pixelRatio;
  214. _self.pixelRatio = 2;
  215. }
  216. }
  217. });
  218. //#endif
  219. this.cWidth = uni.upx2px(750);
  220. this.cHeight = uni.upx2px(500);
  221. this.cWidth2 = uni.upx2px(700);
  222. this.cHeight2 = uni.upx2px(1100);
  223. this.cWidth3 = uni.upx2px(250);
  224. this.cHeight3 = uni.upx2px(250);
  225. this.arcbarWidth = uni.upx2px(24);
  226. this.gaugeWidth = uni.upx2px(30);
  227. //this.fillData(Data);
  228. },
  229. onReady() {
  230. this.getServerData();
  231. },
  232. methods: {
  233. getServerData() {
  234. uni.showLoading({
  235. title: "正在加载数据..."
  236. })
  237. uni.request({
  238. url: 'https://unidemo.dcloud.net.cn/hello-uniapp-ucharts-data.json',
  239. data: {},
  240. success: function(res) {
  241. _self.fillData(res.data);
  242. },
  243. fail: () => {
  244. _self.tips = "网络错误,小程序端请检查合法域名";
  245. },
  246. complete() {
  247. uni.hideLoading();
  248. }
  249. });
  250. },
  251. fillData(data) {
  252. this.serverData = data;
  253. this.tips = data.tips;
  254. this.sliderMax = data.Candle.categories.length;
  255. let Column = {
  256. categories: [],
  257. series: []
  258. };
  259. let ColumnMeter = {
  260. categories: [],
  261. series: []
  262. };
  263. let LineA = {
  264. categories: [],
  265. series: []
  266. };
  267. let LineB = {
  268. categories: [],
  269. series: []
  270. };
  271. let Area = {
  272. categories: [],
  273. series: []
  274. };
  275. let Pie = {
  276. series: []
  277. };
  278. let Ring = {
  279. series: []
  280. };
  281. let Funnel = {
  282. series: []
  283. };
  284. let Radar = {
  285. categories: [],
  286. series: []
  287. };
  288. let Arcbar1 = {
  289. series: []
  290. };
  291. let Arcbar2 = {
  292. series: []
  293. };
  294. let Arcbar3 = {
  295. series: []
  296. };
  297. let Gauge = {
  298. categories: [],
  299. series: []
  300. };
  301. let Candle = {
  302. categories: [],
  303. series: []
  304. };
  305. let Mix = {
  306. categories: [],
  307. series: []
  308. };
  309. //这里我后台返回的是数组,所以用等于,如果您后台返回的是单条数据,需要push进去
  310. Column.categories = data.Column.categories;
  311. //这里的series数据是后台做好的,如果您的数据没有和前面我注释掉的格式一样,请自行拼接数据
  312. Column.series = data.Column.series;
  313. ColumnMeter.categories = data.ColumnMeter.categories;
  314. //这里的series数据,如果为Meter,series[0]定义为外层数据,series[1]定义为内层数据
  315. ColumnMeter.series = data.ColumnMeter.series;
  316. LineA.categories = data.LineA.categories;
  317. LineA.series = data.LineA.series;
  318. LineB.categories = data.LineB.categories;
  319. LineB.series = data.LineB.series;
  320. Area.categories = data.Area.categories;
  321. Area.series = data.Area.series;
  322. Pie.series = data.Pie.series;
  323. Ring.series = data.Ring.series;
  324. Funnel.series = data.Pie.series;
  325. //自定义文案示例,需设置format字段
  326. for (let i = 0; i < Ring.series.length; i++) {
  327. Ring.series[i].format = () => {
  328. return Ring.series[i].name + Ring.series[i].data
  329. };
  330. }
  331. Radar.categories = data.Radar.categories;
  332. Radar.series = data.Radar.series;
  333. Arcbar1.series = data.Arcbar1.series;
  334. Arcbar2.series = data.Arcbar2.series;
  335. Arcbar3.series = data.Arcbar3.series;
  336. Gauge.categories = data.Gauge.categories;
  337. Gauge.series = data.Gauge.series;
  338. Candle.categories = data.Candle.categories;
  339. Candle.series = data.Candle.series;
  340. Mix.categories = data.Mix.categories;
  341. Mix.series = data.Mix.series;
  342. this.showColumn("canvasColumn", Column);
  343. this.showColumnMeter("canvasColumnMeter", ColumnMeter);
  344. this.showLineA("canvasLineA", LineA);
  345. this.showLineB("canvasLineB", LineB);
  346. this.showArea("canvasArea", Area);
  347. this.showPie("canvasPie", Pie);
  348. this.showRing("canvasRing", Ring);
  349. this.showFunnel("canvasFunnel", Funnel);
  350. this.showRadar("canvasRadar", Radar);
  351. this.showArcbar("canvasArcbar1", Arcbar1);
  352. this.showArcbar2("canvasArcbar2", Arcbar2);
  353. this.showArcbar3("canvasArcbar3", Arcbar3);
  354. this.showGauge("canvasGauge", Gauge);
  355. this.showCandle("canvasCandle", Candle);
  356. this.showMix("canvasMix", Mix);
  357. },
  358. showColumn(canvasId, chartData) {
  359. canvasObj[canvasId] = new uCharts({
  360. $this: _self,
  361. canvasId: canvasId,
  362. type: 'column',
  363. padding: [15, 15, 0, 15],
  364. legend: {
  365. show: true,
  366. padding: 5,
  367. lineHeight: 11,
  368. margin: 0,
  369. },
  370. fontSize: 11,
  371. background: '#FFFFFF',
  372. pixelRatio: _self.pixelRatio,
  373. animation: false,
  374. categories: chartData.categories,
  375. series: chartData.series,
  376. xAxis: {
  377. disableGrid: true,
  378. },
  379. yAxis: {
  380. format: (val) => {
  381. return val.toFixed(0) + '元'
  382. }
  383. },
  384. dataLabel: true,
  385. width: _self.cWidth * _self.pixelRatio,
  386. height: _self.cHeight * _self.pixelRatio,
  387. extra: {
  388. column: {
  389. type: 'group',
  390. width: _self.cWidth * _self.pixelRatio * 0.45 / chartData.categories.length
  391. }
  392. }
  393. });
  394. },
  395. showColumnMeter(canvasId, chartData) {
  396. canvasObj[canvasId] = new uCharts({
  397. $this: _self,
  398. canvasId: canvasId,
  399. type: 'column',
  400. padding: [15, 15, 0, 15],
  401. legend: {
  402. show: true,
  403. padding: 5,
  404. lineHeight: 11,
  405. margin: 0,
  406. },
  407. fontSize: 11,
  408. background: '#FFFFFF',
  409. pixelRatio: _self.pixelRatio,
  410. animation: false,
  411. categories: chartData.categories,
  412. series: chartData.series,
  413. xAxis: {
  414. disableGrid: true,
  415. },
  416. yAxis: {
  417. //disabled:true
  418. },
  419. dataLabel: true,
  420. width: _self.cWidth * _self.pixelRatio,
  421. height: _self.cHeight * _self.pixelRatio,
  422. extra: {
  423. column: {
  424. type: 'meter',
  425. width: _self.cWidth * _self.pixelRatio * 0.45 / chartData.categories.length,
  426. meter: {
  427. border: 4,
  428. fillColor: '#E5FDC3'
  429. }
  430. }
  431. }
  432. });
  433. },
  434. showLineA(canvasId, chartData) {
  435. canvasObj[canvasId] = new uCharts({
  436. $this: _self,
  437. canvasId: canvasId,
  438. type: 'line',
  439. fontSize: 11,
  440. padding: [15, 15, 0, 15],
  441. legend: {
  442. show: true,
  443. padding: 5,
  444. lineHeight: 11,
  445. margin: 5,
  446. },
  447. dataLabel: false,
  448. dataPointShape: false,
  449. background: '#FFFFFF',
  450. pixelRatio: _self.pixelRatio,
  451. categories: chartData.categories,
  452. series: chartData.series,
  453. animation: false,
  454. enableScroll: true, //开启图表拖拽功能
  455. xAxis: {
  456. disableGrid: false,
  457. type: 'grid',
  458. gridType: 'dash',
  459. itemCount: 4,
  460. scrollShow: true,
  461. scrollAlign: 'left',
  462. //scrollBackgroundColor:'#F7F7FF',//可不填写,配合enableScroll图表拖拽功能使用,X轴滚动条背景颜色,默认为 #EFEBEF
  463. //scrollColor:'#DEE7F7',//可不填写,配合enableScroll图表拖拽功能使用,X轴滚动条颜色,默认为 #A6A6A6
  464. },
  465. yAxis: {
  466. //disabled:true
  467. gridType: 'dash',
  468. splitNumber: 8,
  469. min: 10,
  470. max: 180,
  471. format: (val) => {
  472. return val.toFixed(0) + '元'
  473. } //如不写此方法,Y轴刻度默认保留两位小数
  474. },
  475. width: _self.cWidth * _self.pixelRatio,
  476. height: _self.cHeight * _self.pixelRatio,
  477. dataLabel: true,
  478. dataPointShape: true,
  479. extra: {
  480. lineStyle: 'straight'
  481. },
  482. });
  483. },
  484. showLineB(canvasId, chartData) {
  485. canvasObj[canvasId] = new uCharts({
  486. $this: _self,
  487. canvasId: canvasId,
  488. type: 'line',
  489. fontSize: 11,
  490. padding: [15, 15, 0, 15],
  491. legend: {
  492. show: true,
  493. padding: 5,
  494. lineHeight: 11,
  495. margin: 5,
  496. },
  497. background: '#FFFFFF',
  498. pixelRatio: _self.pixelRatio,
  499. rotate: true, //开启图表横屏
  500. // #ifdef MP-ALIPAY
  501. rotateLock: true, //百度及支付宝需要锁定旋转
  502. // #endif
  503. categories: chartData.categories,
  504. animation: false,
  505. series: chartData.series,
  506. xAxis: {
  507. disableGrid: true,
  508. },
  509. yAxis: {
  510. //disabled:true
  511. },
  512. width: _self.cWidth2 * _self.pixelRatio,
  513. height: _self.cHeight2 * _self.pixelRatio,
  514. dataLabel: true,
  515. dataPointShape: true,
  516. extra: {
  517. lineStyle: 'curve'
  518. },
  519. });
  520. },
  521. showArea(canvasId, chartData) {
  522. canvasObj[canvasId] = new uCharts({
  523. $this: _self,
  524. canvasId: canvasId,
  525. type: 'area',
  526. fontSize: 11,
  527. padding: [0, 15, 10, 15],
  528. legend: {
  529. show: true,
  530. position: 'top',
  531. float: 'center',
  532. itemGap: 30,
  533. padding: 5,
  534. lineHeight: 18,
  535. margin: 0,
  536. },
  537. dataLabel: false,
  538. dataPointShape: true,
  539. background: '#FFFFFF',
  540. pixelRatio: _self.pixelRatio,
  541. categories: chartData.categories,
  542. series: chartData.series,
  543. animation: false,
  544. xAxis: {
  545. type: 'grid',
  546. gridColor: '#CCCCCC',
  547. gridType: 'dash',
  548. dashLength: 8,
  549. boundaryGap: 'justify' //两端不留白配置
  550. },
  551. yAxis: {
  552. gridType: 'dash',
  553. gridColor: '#CCCCCC',
  554. dashLength: 8,
  555. splitNumber: 5,
  556. },
  557. width: _self.cWidth * _self.pixelRatio,
  558. height: _self.cHeight * _self.pixelRatio,
  559. extra: {
  560. area: {
  561. type: 'curve',
  562. opacity: 0.2,
  563. addLine: true,
  564. width: 2
  565. }
  566. }
  567. });
  568. },
  569. showPie(canvasId, chartData) {
  570. canvasObj[canvasId] = new uCharts({
  571. $this: _self,
  572. canvasId: canvasId,
  573. type: 'pie',
  574. fontSize: 11,
  575. padding: [15, 15, 0, 15],
  576. legend: {
  577. show: true,
  578. padding: 5,
  579. lineHeight: 11,
  580. margin: 0,
  581. },
  582. background: '#FFFFFF',
  583. pixelRatio: _self.pixelRatio,
  584. series: chartData.series,
  585. animation: false,
  586. width: _self.cWidth * _self.pixelRatio,
  587. height: _self.cHeight * _self.pixelRatio,
  588. dataLabel: true,
  589. extra: {
  590. pie: {
  591. lableWidth: 15
  592. }
  593. },
  594. });
  595. },
  596. showRing(canvasId, chartData) {
  597. canvasObj[canvasId] = new uCharts({
  598. $this: _self,
  599. canvasId: canvasId,
  600. type: 'ring',
  601. fontSize: 11,
  602. padding: [5, 5, 5, 5],
  603. legend: {
  604. show: true,
  605. position: 'right',
  606. float: 'center',
  607. itemGap: 10,
  608. padding: 5,
  609. lineHeight: 26,
  610. margin: 5,
  611. //backgroundColor:'rgba(41,198,90,0.2)',
  612. //borderColor :'rgba(41,198,90,0.5)',
  613. borderWidth: 1
  614. },
  615. title: {
  616. name: '70%',
  617. color: '#7cb5ec',
  618. fontSize: 25 * _self.pixelRatio,
  619. },
  620. subtitle: {
  621. name: '收益率',
  622. color: '#666666',
  623. fontSize: 15 * _self.pixelRatio,
  624. },
  625. extra: {
  626. pie: {
  627. lableWidth: 15,
  628. ringWidth: 40 * _self.pixelRatio, //圆环的宽度
  629. offsetAngle: 0 //圆环的角度
  630. }
  631. },
  632. background: '#FFFFFF',
  633. pixelRatio: _self.pixelRatio,
  634. series: chartData.series,
  635. animation: false,
  636. width: _self.cWidth * _self.pixelRatio,
  637. height: _self.cHeight * _self.pixelRatio,
  638. disablePieStroke: true,
  639. dataLabel: true,
  640. });
  641. },
  642. showFunnel(canvasId, chartData) {
  643. canvasObj[canvasId] = new uCharts({
  644. $this: _self,
  645. canvasId: canvasId,
  646. type: 'funnel',
  647. fontSize: 11,
  648. padding: [15, 15, 0, 15],
  649. legend: {
  650. show: true,
  651. padding: 5,
  652. lineHeight: 11,
  653. margin: 0,
  654. },
  655. background: '#FFFFFF',
  656. pixelRatio: _self.pixelRatio,
  657. series: chartData.series,
  658. animation: false,
  659. width: _self.cWidth * _self.pixelRatio,
  660. height: _self.cHeight * _self.pixelRatio,
  661. dataLabel: true,
  662. extra: {
  663. funnel: {
  664. border: true,
  665. borderWidth: 2,
  666. borderColor: '#FFFFFF'
  667. }
  668. },
  669. });
  670. },
  671. showRadar(canvasId, chartData) {
  672. canvasObj[canvasId] = new uCharts({
  673. $this: _self,
  674. canvasId: canvasId,
  675. type: 'radar',
  676. fontSize: 11,
  677. padding: [15, 15, 0, 15],
  678. legend: {
  679. show: true,
  680. padding: 5,
  681. lineHeight: 11,
  682. margin: 0,
  683. },
  684. background: '#FFFFFF',
  685. pixelRatio: _self.pixelRatio,
  686. animation: false,
  687. dataLabel: true,
  688. categories: chartData.categories,
  689. series: chartData.series,
  690. width: _self.cWidth * _self.pixelRatio,
  691. height: _self.cHeight * _self.pixelRatio,
  692. extra: {
  693. radar: {
  694. max: 200 //雷达数值的最大值
  695. }
  696. }
  697. });
  698. },
  699. showArcbar(canvasId, chartData) {
  700. new uCharts({
  701. $this: _self,
  702. canvasId: canvasId,
  703. type: 'arcbar',
  704. fontSize: 11,
  705. title: {
  706. name: Math.round(chartData.series[0].data * 100) + '%',
  707. color: chartData.series[0].color,
  708. fontSize: 25 * _self.pixelRatio
  709. },
  710. subtitle: {
  711. name: chartData.series[0].name,
  712. color: '#666666',
  713. fontSize: 15 * _self.pixelRatio
  714. },
  715. extra: {
  716. arcbar: {
  717. type: 'default',
  718. width: _self.arcbarWidth * _self.pixelRatio, //圆弧的宽度
  719. }
  720. },
  721. background: '#FFFFFF',
  722. pixelRatio: _self.pixelRatio,
  723. series: chartData.series,
  724. animation: false,
  725. width: _self.cWidth3 * _self.pixelRatio,
  726. height: _self.cHeight3 * _self.pixelRatio,
  727. dataLabel: true,
  728. });
  729. },
  730. showArcbar2(canvasId, chartData) {
  731. new uCharts({
  732. $this: _self,
  733. canvasId: canvasId,
  734. type: 'arcbar',
  735. fontSize: 11,
  736. title: {
  737. name: Math.round(chartData.series[0].data * 100) + '%',
  738. color: chartData.series[0].color,
  739. fontSize: 25 * _self.pixelRatio
  740. },
  741. subtitle: {
  742. name: chartData.series[0].name,
  743. color: '#666666',
  744. fontSize: 15 * _self.pixelRatio
  745. },
  746. extra: {
  747. arcbar: {
  748. type: 'default',
  749. width: _self.arcbarWidth * _self.pixelRatio, //圆弧的宽度
  750. backgroundColor: '#ffe3e8',
  751. startAngle: 1.25,
  752. endAngle: 0.75
  753. }
  754. },
  755. background: '#FFFFFF',
  756. pixelRatio: _self.pixelRatio,
  757. series: chartData.series,
  758. animation: false,
  759. width: _self.cWidth3 * _self.pixelRatio,
  760. height: _self.cHeight3 * _self.pixelRatio,
  761. dataLabel: true,
  762. });
  763. },
  764. showArcbar3(canvasId, chartData) {
  765. new uCharts({
  766. $this: _self,
  767. canvasId: canvasId,
  768. type: 'arcbar',
  769. fontSize: 11,
  770. title: {
  771. name: Math.round(chartData.series[0].data * 100) + '%',
  772. color: chartData.series[0].color,
  773. fontSize: 25 * _self.pixelRatio
  774. },
  775. subtitle: {
  776. name: chartData.series[0].name,
  777. color: '#666666',
  778. fontSize: 15 * _self.pixelRatio
  779. },
  780. extra: {
  781. arcbar: {
  782. type: 'circle', //整圆类型进度条图
  783. width: _self.arcbarWidth * _self.pixelRatio, //圆弧的宽度
  784. startAngle: 0.5 //整圆类型只需配置起始角度即可
  785. }
  786. },
  787. background: '#FFFFFF',
  788. pixelRatio: _self.pixelRatio,
  789. series: chartData.series,
  790. animation: false,
  791. width: _self.cWidth3 * _self.pixelRatio,
  792. height: _self.cHeight3 * _self.pixelRatio,
  793. dataLabel: true,
  794. });
  795. },
  796. showGauge(canvasId, chartData) {
  797. canvasObj[canvasId] = new uCharts({
  798. $this: _self,
  799. canvasId: canvasId,
  800. type: 'gauge',
  801. fontSize: 11,
  802. title: {
  803. name: Math.round(chartData.series[0].data * 100) + '%',
  804. color: chartData.categories[1].color,
  805. fontSize: 25 * _self.pixelRatio,
  806. offsetY: 50 * _self.pixelRatio, //新增参数,自定义调整Y轴文案距离
  807. },
  808. subtitle: {
  809. name: chartData.series[0].name,
  810. color: '#666666',
  811. fontSize: 15 * _self.pixelRatio,
  812. offsetY: -50 * _self.pixelRatio, //新增参数,自定义调整Y轴文案距离
  813. },
  814. extra: {
  815. gauge: {
  816. type: 'default',
  817. width: _self.gaugeWidth * _self.pixelRatio, //仪表盘背景的宽度
  818. startAngle: 0.75,
  819. endAngle: 0.25,
  820. startNumber: 0,
  821. endNumber: 100,
  822. splitLine: {
  823. fixRadius: 0,
  824. splitNumber: 10,
  825. width: _self.gaugeWidth * _self.pixelRatio, //仪表盘背景的宽度
  826. color: '#FFFFFF',
  827. childNumber: 5,
  828. childWidth: _self.gaugeWidth * 0.4 * _self.pixelRatio, //仪表盘背景的宽度
  829. },
  830. pointer: {
  831. width: _self.gaugeWidth * 0.8 * _self.pixelRatio, //指针宽度
  832. color: 'auto'
  833. }
  834. }
  835. },
  836. background: '#FFFFFF',
  837. pixelRatio: _self.pixelRatio,
  838. categories: chartData.categories,
  839. series: chartData.series,
  840. animation: true,
  841. width: _self.cWidth * _self.pixelRatio,
  842. height: _self.cHeight * _self.pixelRatio,
  843. dataLabel: true,
  844. });
  845. },
  846. changeGaugeData() {
  847. let series = [{
  848. name: "完成率",
  849. data: Math.random()
  850. }]; //这里是随机数据,生产环境请从服务器获取,注意series数据类型为数组
  851. //这里我借用之前的categories数据,判断一下新数据的title.color,没有写死在程序里,以便于自定义
  852. let newTitleColor;
  853. for (let i = 0; i < _self.serverData.Gauge.categories.length; i++) {
  854. if (series[0].data <= _self.serverData.Gauge.categories[i].value) {
  855. newTitleColor = _self.serverData.Gauge.categories[i].color;
  856. break;
  857. }
  858. }
  859. canvasObj['canvasGauge'].updateData({
  860. series: series, //这里给了新数值
  861. categories: _self.serverData.Gauge.categories,
  862. title: {
  863. name: Math.round(series[0].data * 100) + '%',
  864. color: newTitleColor,
  865. fontSize: 25 * _self.pixelRatio,
  866. offsetY: 50 * _self.pixelRatio, //新增参数,自定义调整Y轴文案距离
  867. },
  868. subtitle: {
  869. name: '更新数据',
  870. color: '#666666',
  871. fontSize: 15 * _self.pixelRatio,
  872. offsetY: -50 * _self.pixelRatio, //新增参数,自定义调整Y轴文案距离
  873. }
  874. });
  875. },
  876. showCandle(canvasId, chartData) {
  877. canvasObj[canvasId] = new uCharts({
  878. $this: _self,
  879. canvasId: canvasId,
  880. type: 'candle',
  881. fontSize: 11,
  882. padding: [15, 15, 0, 15],
  883. legend: {
  884. show: true,
  885. padding: 5,
  886. lineHeight: 11,
  887. margin: 8,
  888. },
  889. background: '#FFFFFF',
  890. pixelRatio: _self.pixelRatio,
  891. enableMarkLine: true,
  892. /***需要开启标记线***/
  893. categories: chartData.categories,
  894. series: chartData.series,
  895. animation: true,
  896. enableScroll: true, //开启图表拖拽功能
  897. xAxis: {
  898. disableGrid: true, //不绘制X轴网格线
  899. labelCount: 4, //X轴文案数量
  900. //type:'grid',
  901. //gridType:'dash',
  902. itemCount: _self.itemCount, //可不填写,配合enableScroll图表拖拽功能使用,x轴单屏显示数据的数量,默认为5个
  903. scrollShow: true, //新增是否显示滚动条,默认false
  904. scrollAlign: 'right',
  905. //scrollBackgroundColor:'#F7F7FF',//可不填写,配合enableScroll图表拖拽功能使用,X轴滚动条背景颜色,默认为 #EFEBEF
  906. //scrollColor:'#DEE7F7',//可不填写,配合enableScroll图表拖拽功能使用,X轴滚动条颜色,默认为 #A6A6A6
  907. },
  908. yAxis: {
  909. //disabled:true
  910. gridType: 'dash',
  911. splitNumber: 5,
  912. format: (val) => {
  913. return val.toFixed(0)
  914. }
  915. },
  916. width: _self.cWidth * _self.pixelRatio,
  917. height: _self.cHeight * _self.pixelRatio,
  918. dataLabel: false,
  919. dataPointShape: true,
  920. extra: {
  921. candle: {
  922. color: {
  923. upLine: '#f04864',
  924. upFill: '#f04864',
  925. downLine: '#2fc25b',
  926. downFill: '#2fc25b'
  927. },
  928. average: {
  929. show: true,
  930. name: ['MA5', 'MA10', 'MA30'],
  931. day: [5, 10, 20],
  932. color: ['#1890ff', '#2fc25b', '#facc14']
  933. }
  934. },
  935. tooltip: {
  936. bgColor: '#000000',
  937. bgOpacity: 0.7,
  938. gridType: 'dash',
  939. dashLength: 5,
  940. gridColor: '#1890ff',
  941. fontColor: '#FFFFFF',
  942. horizentalLine: true,
  943. xAxisLabel: true,
  944. yAxisLabel: true,
  945. labelBgColor: '#DFE8FF',
  946. labelBgOpacity: 0.95,
  947. labelAlign: 'left',
  948. labelFontColor: '#666666'
  949. },
  950. markLine: {
  951. type: 'dash',
  952. dashLength: 5,
  953. data: [{
  954. value: 2150,
  955. lineColor: '#f04864',
  956. showLabel: true
  957. }, {
  958. value: 2350,
  959. lineColor: '#f04864',
  960. showLabel: true
  961. }]
  962. }
  963. }
  964. });
  965. },
  966. touchCandle(e) {
  967. canvasObj['canvasCandle'].scrollStart(e);
  968. },
  969. moveCandle(e) {
  970. canvasObj['canvasCandle'].scroll(e);
  971. },
  972. touchEndCandle(e) {
  973. canvasObj['canvasCandle'].scrollEnd(e);
  974. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  975. canvasObj['canvasCandle'].showToolTip(e, {
  976. format: function(item, category) {
  977. return category + ' ' + item.name + ':' + item.data
  978. }
  979. });
  980. },
  981. changeData() {
  982. canvasObj['canvasColumn'].updateData({
  983. series: _self.serverData.ColumnB.series,
  984. categories: _self.serverData.ColumnB.categories
  985. });
  986. },
  987. touchLineA(e) {
  988. canvasObj['canvasLineA'].scrollStart(e);
  989. },
  990. moveLineA(e) {
  991. canvasObj['canvasLineA'].scroll(e);
  992. },
  993. touchEndLineA(e) {
  994. canvasObj['canvasLineA'].scrollEnd(e);
  995. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  996. canvasObj['canvasLineA'].showToolTip(e, {
  997. format: function(item, category) {
  998. return category + ' ' + item.name + ':' + item.data
  999. }
  1000. });
  1001. },
  1002. showMix(canvasId, chartData) {
  1003. canvasObj[canvasId] = new uCharts({
  1004. $this: _self,
  1005. canvasId: canvasId,
  1006. type: 'mix',
  1007. fontSize: 11,
  1008. padding: [15, 15, 0, 15],
  1009. legend: {
  1010. show: true,
  1011. padding: 5,
  1012. lineHeight: 11,
  1013. margin: 6,
  1014. },
  1015. background: '#FFFFFF',
  1016. pixelRatio: _self.pixelRatio,
  1017. categories: chartData.categories,
  1018. series: chartData.series,
  1019. animation: false,
  1020. enableScroll: true, //开启图表拖拽功能
  1021. xAxis: {
  1022. disableGrid: false,
  1023. type: 'grid',
  1024. gridType: 'dash',
  1025. itemCount: 4,
  1026. scrollShow: true,
  1027. scrollAlign: 'left',
  1028. },
  1029. yAxis: {
  1030. gridType: 'dash',
  1031. dashLength: 4,
  1032. splitNumber: 5,
  1033. min: 10,
  1034. max: 180,
  1035. format: (val) => {
  1036. return val.toFixed(0)
  1037. }
  1038. },
  1039. width: _self.cWidth * _self.pixelRatio,
  1040. height: _self.cHeight * _self.pixelRatio,
  1041. dataLabel: true,
  1042. dataPointShape: true,
  1043. extra: {
  1044. column: {
  1045. width: 20 * _self.pixelRatio
  1046. },
  1047. tooltip: {
  1048. bgColor: '#000000',
  1049. bgOpacity: 0.7,
  1050. gridType: 'dash',
  1051. dashLength: 8,
  1052. gridColor: '#1890ff',
  1053. fontColor: '#FFFFFF',
  1054. horizentalLine: true,
  1055. xAxisLabel: true,
  1056. yAxisLabel: true,
  1057. labelBgColor: '#DFE8FF',
  1058. labelBgOpacity: 0.95,
  1059. labelAlign: 'left',
  1060. labelFontColor: '#666666'
  1061. }
  1062. },
  1063. });
  1064. },
  1065. touchMix(e) {
  1066. canvasObj['canvasMix'].scrollStart(e);
  1067. },
  1068. moveMix(e) {
  1069. canvasObj['canvasMix'].scroll(e);
  1070. },
  1071. touchEndMix(e) {
  1072. canvasObj['canvasMix'].scrollEnd(e);
  1073. canvasObj['canvasMix'].touchLegend(e);
  1074. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1075. canvasObj['canvasMix'].showToolTip(e, {
  1076. format: function(item, category) {
  1077. return category + ' ' + item.name + ':' + item.data
  1078. }
  1079. });
  1080. },
  1081. touchIt(e, id) {
  1082. canvasObj[id].touchLegend(e, {
  1083. animation: false
  1084. });
  1085. canvasObj[id].showToolTip(e, {
  1086. format: function(item, category) {
  1087. if (typeof item.data === 'object') {
  1088. return category + ' ' + item.name + ':' + item.data.value
  1089. } else {
  1090. return category + ' ' + item.name + ':' + item.data
  1091. }
  1092. }
  1093. });
  1094. },
  1095. touchPie(e, id) {
  1096. canvasObj[id].showToolTip(e, {
  1097. format: function(item) {
  1098. return item.name + ':' + item.data
  1099. }
  1100. });
  1101. },
  1102. }
  1103. }
  1104. </script>
  1105. <style>
  1106. page {
  1107. background: #fff;
  1108. /* width: 750rpx; */
  1109. /* width: 100%; */
  1110. overflow-x: hidden;
  1111. }
  1112. .qiun-padding {
  1113. padding: 2%;
  1114. width: 96%;
  1115. }
  1116. .qiun-wrap {
  1117. display: flex;
  1118. flex-wrap: wrap;
  1119. }
  1120. .qiun-rows {
  1121. display: flex;
  1122. flex-direction: row !important;
  1123. }
  1124. .qiun-columns {
  1125. display: flex;
  1126. flex-direction: column !important;
  1127. }
  1128. .qiun-common-mt {
  1129. margin-top: 10rpx;
  1130. }
  1131. .qiun-bg-white {
  1132. background: #FFFFFF;
  1133. }
  1134. .qiun-title-bar {
  1135. width: 96%;
  1136. padding: 10rpx 2%;
  1137. flex-wrap: nowrap;
  1138. }
  1139. .qiun-title-dot-light {
  1140. border-left: 10rpx solid #0ea391;
  1141. padding-left: 10rpx;
  1142. font-size: 32rpx;
  1143. color: #000000
  1144. }
  1145. /* 通用样式 */
  1146. .qiun-charts {
  1147. /* width: 750rpx; */
  1148. /* width:100%; */
  1149. height: 500rpx;
  1150. background-color: #FFFFFF;
  1151. }
  1152. .charts {
  1153. /* width: 750rpx; */
  1154. width:100%;
  1155. height: 500rpx;
  1156. background-color: #FFFFFF;
  1157. }
  1158. /* 横屏样式 */
  1159. .qiun-charts-rotate {
  1160. width: 700rpx;
  1161. height: 1100rpx;
  1162. background-color: #FFFFFF;
  1163. padding: 25rpx;
  1164. }
  1165. .charts-rotate {
  1166. width: 700rpx;
  1167. height: 1100rpx;
  1168. background-color: #FFFFFF;
  1169. }
  1170. /* 圆弧进度样式 */
  1171. .qiun-charts3 {
  1172. /* width: 750rpx;
  1173. width:100%; */
  1174. height: 250rpx;
  1175. background-color: #FFFFFF;
  1176. position: relative;
  1177. }
  1178. .charts3 {
  1179. position: absolute;
  1180. width: 250rpx;
  1181. height: 250rpx;
  1182. background-color: #FFFFFF;
  1183. }
  1184. .qiun-tip {
  1185. display: block;
  1186. width: auto;
  1187. overflow: hidden;
  1188. padding: 15rpx;
  1189. height: 30rpx;
  1190. line-height: 30rpx;
  1191. margin: 10rpx;
  1192. background: #ff9933;
  1193. font-size: 30rpx;
  1194. border-radius: 8rpx;
  1195. justify-content: center;
  1196. text-align: center;
  1197. border: 1px solid #dc7004;
  1198. color: #FFFFFF;
  1199. }
  1200. </style>