1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>立体柱状图</title> <!-- 立体柱状图 --> <script src="https://www.amcharts.com/lib/3/amcharts.js"></script> <script src="https://www.amcharts.com/lib/3/serial.js"></script> </head> <body> <div id="car3" style="text-align:center;width:440px;height:180px;"> <script type="text/javascript"> var chartData = [{ country: "订单未确定", visits: 50 , "color": "#067ADD"}, { country: "订单已确定", visits: 166 , "color": "#FA0606"}, { country: "订单已处理", visits: 26 , "color": "#14EF06"}, { country: "订单完成", visits: 80 , "color": "#F802BC"}, { country: "订单已发货", visits: 56 , "color": "#0FFBF9"}, ]; var chart = new AmCharts.AmSerialChart(); chart.dataProvider = chartData; chart.categoryField = "country"; chart.color = "#4C4CFD"; chart.startDuration = 2; chart.columnWidth = 0.4; chart.depth3D = 8; chart.angle = 30; chart.depth3D = 15; var categoryAxis = chart.categoryAxis; categoryAxis.gridColor = "#067ADD"; categoryAxis.axisColor = "#067ADD"; var valueAxis = new AmCharts.ValueAxis(); valueAxis.axisColor = "#067ADD"; chart.addValueAxis(valueAxis); var graph = new AmCharts.AmGraph(); graph.valueField = "visits" ; graph.colorField = "color"; graph.lineAlpha = 0.1; graph.fillAlphas = 0.85; graph.type = "column"; chart.addGraph(graph); graph.fillAlphas = 1; graph.balloonText = "<b>[[category]]: [[value]] 单</b>"; chart.write('car3'); </script> </div> </body> </html>
|