Amchart column graph
How do I make an amchart column graph?
What is a amchart column graph? How do you make a amchart column graph? This script and codes were developed by Drew Adams on 29 September 2022, Thursday.
Amchart column graph - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>amchart column graph</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="http://www.wgu.edu/sites/all/themes/bricktheme/javascripts/amcharts/amcharts.js"></script>
<script src="http://www.wgu.edu/sites/all/themes/bricktheme/javascripts/amcharts/serial.js"></script>
<script src="amcharts/plugins/dataloader/dataloader.min.js" type="text/javascript"></script>
<script src="amcharts/plugins/responsive/responsive.min.js" type="text/javascript"></script>
<div id="chartdiv" class="bar-chart"></div> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Amchart column graph - Script Codes CSS Codes
#chartdiv{ height: 300px; width: 350px;
}
Amchart column graph - Script Codes JS Codes
// info to be graphed
var chartData = [ { timeToGraduate: "1<br>Year", percent: 38, color: "#ffffff" }, { color: "#ffffff", percent: 29, timeToGraduate: "1.5<br>Years" }, { color: "#ffffff", percent: 19, timeToGraduate: "2<br>Years" }, { color: "#ffffff", percent: 9, timeToGraduate: "2.5<br>Years" }, { color: "#ffffff", percent: 3, timeToGraduate: "3<br>Years"
} ];
// chart properties
var chart = new AmCharts.AmSerialChart();
//chart.angle = 30;
chart.categoryAxis.labelsEnabled = false; // disables x-axis category labels
chart.categoryAxis.title = "Time to Graduate";
chart.categoryAxis.titleColor = "#406591";
chart.categoryField = "timeToGraduate";
//chart.columnSpacing3D = 10;
chart.dataProvider = chartData;
//chart.depth3D = 25;
chart.handDrawn = false;
chart.type = "serial";
// graph properties
var graph = new AmCharts.AmGraph();
graph.balloonText = "[[value]]%";
graph.fillAlphas = 1; // sets opacity of each graph
graph.labelColorField = "color"; // references 'color' in chartData
graph.labelPosition = "bottom"; // positions graph lables below the top of the graph
graph.labelText = "[[category]]";
graph.lineColor = "#406591";
graph.type = "column";
graph.valueField = "percent";
chart.addGraph(graph);
// valueAxis properties
var valueAxis = new AmCharts.ValueAxis();
valueAxis.labelFrequency = 1;
valueAxis.minimum = 0;
valueAxis.maximum = 50;
valueAxis.title = "Percent of Grads";
valueAxis.titleColor = "#406591";
valueAxis.unit = "%";
chart.addValueAxis(valueAxis); // add valueAxis properties to chart
// draw out the graph
chart.write("chartdiv");
Developer | Drew Adams |
Username | drewtadams |
Uploaded | September 29, 2022 |
Rating | 3 |
Size | 2,246 Kb |
Views | 20,240 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Multiple Choice Quiz | 4,045 Kb |
Jquery 2d character movement | 4,291 Kb |
Beescientific | 4,735 Kb |
A Pen by Drew Adams | 1,741 Kb |
Gsap dribbling basketball | 2,502 Kb |
Text banner | 1,955 Kb |
Generic button | 2,046 Kb |
Vanilla js carousel | 4,064 Kb |
Zombie Follow - In Progress | 3,921 Kb |
Complimentary hex color calculator | 4,557 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Starfield using KineticJS | Asp | 3,512 Kb |
Pure CSS Animated Photo Stack | Depthdev | 2,486 Kb |
Mesmerizing octopus | Jllodra | 3,549 Kb |
CSS Chat Bubbles | Boylett | 2,094 Kb |
Fixed with using Calc | Tomleo | 2,542 Kb |
Ball Physics | Getsetbro | 3,149 Kb |
CSS Dynamic Width Square Div | Elleestcrimi | 2,861 Kb |
A Pen by Mike Otis | Mikeotis | 3,185 Kb |
Header | Er40 | 1,542 Kb |
Simple DevTools | Deegill | 2,511 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!