Google Charts API - Dual Y-axis Line Chart v2
How do I make an google charts api - dual y-axis line chart v2?
What is a google charts api - dual y-axis line chart v2? How do you make a google charts api - dual y-axis line chart v2? This script and codes were developed by NM on 22 October 2022, Saturday.
Google Charts API - Dual Y-axis Line Chart v2 - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Google Charts API - Dual Y-axis Line Chart v2</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="chart_div"></div>
<div id="my_div"></div> <script src='https://www.gstatic.com/charts/loader.js'></script> <script src="js/index.js"></script>
</body>
</html>
Google Charts API - Dual Y-axis Line Chart v2 - Script Codes CSS Codes
body { margin: 0; padding: 0;
}
img.ri { position: relative; display: block; width: 100%; height: auto;
}
Google Charts API - Dual Y-axis Line Chart v2 - Script Codes JS Codes
google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var chartDiv = document.getElementById('chart_div'); var data = new google.visualization.DataTable(); data.addColumn('date', 'Year'); data.addColumn('number', "Workers per dependent"); data.addColumn('number', "Income per person"); data.addRows([ [new Date(1950, 0, 1), 1.1, 900.00], [new Date(1975, 0, 1), 1.0, 800.00], [new Date(2000, 0, 1), 1.2, 500.00], [new Date(2025, 0, 1), 1.1, 700.00], [new Date(2050, 0, 1), 1.0, 600.00], [new Date(2075, 0, 1), 1.2, 500.00], [new Date(2100, 0, 1), 1.1, 900.00], ]); var classicOptions = { title: 'Kenya: potential for demographic dividend', titleTextStyle: { color: 'red', fontSize: 24, bold: true, italic: false }, width: '100%', height: 640, curveType: 'function', fontSize: 14, fontName: 'Arial', backgroundColor: '#ffffff', legend: { position: 'top', alignment: 'start', textStyle: { color: 'red' } }, lineWidth: 2, colors: ['red', 'red'], chartArea:{ left: 100, top: 100, right: 100, bottom: 100, width: '100%', height: '100%' }, // Gives each series an axis that matches the vAxes number below. series: { 0: { targetAxisIndex: 0, lineDashStyle: [1, 2] }, 1: { targetAxisIndex: 1 } }, vAxes: { 0: { title: 'Workers per dependent', titleTextStyle: { color: 'red', fontSize: 16, bold: true, italic: false, }, textStyle: { color: 'red' }, baseline: 0, baselineColor: 'red', gridlines: { color: 'transparent' }, textPosition: 'out', format: 'decimal', viewWindowMode: 'pretty', viewWindow: { max: 3, min: 0 } }, 1: { title: 'Income per person', titleTextStyle: { color: 'red', fontSize: 16, bold: true, italic: false, }, textStyle: { color: 'red' }, baseline: 0, baselineColor: 'red', gridlines: { color: 'transparent', }, textPosition: 'out', //format: 'currency', format: '€', viewWindowMode: 'pretty', viewWindow: { max: 1000, min:0 } } }, hAxis: { title: 'Year', titleTextStyle: { color: 'red', fontSize: 16, fontSize: 15, bold: true, italic: false }, textStyle: { color: 'red' }, baselineColor: 'red', gridlines: { color: 'lightred', }, textPosition: 'out', //slantedText: true, //slantedTextAngle: 90 } }; function drawClassicChart() { var classicChart = new google.visualization.LineChart(chartDiv); var my_div = document.getElementById('my_div'); google.visualization.events.addListener(classicChart, 'ready', function () { my_div.innerHTML = '<img src="' + classicChart.getImageURI() + '" class="ri">'; }); classicChart.draw(data, classicOptions); } drawClassicChart(); }
Developer | NM |
Username | tokant |
Uploaded | October 22, 2022 |
Rating | 3 |
Size | 2,664 Kb |
Views | 32,384 |
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 |
HTML5 video playbackRate | 1,649 Kb |
Template V2 | 2,834 Kb |
Case | 1,833 Kb |
Horisontal scroll site | 2,807 Kb |
Google Maps Javascript API - Geolocation | 2,363 Kb |
A Pen by NM | 3,805 Kb |
Google Chart API - tests | 3,064 Kb |
Google Chart API - Multi Series Bar Chart | 1,812 Kb |
Draggable with rotation | 1,742 Kb |
Horisontal accordion | 2,730 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 |
Funny menu | AxeLVaisper | 4,671 Kb |
Svg sky | Omodev | 7,070 Kb |
CSS3 Snow Animation | NickyCDK | 1,695 Kb |
Simple Accordion | Wearebold | 3,683 Kb |
Drifting Clouds | Benedikte | 2,247 Kb |
Vue.js Lazy Loading | Kjbrum | 3,620 Kb |
Avero - Collectieve LVVP Arbeidsongeschiktheidsverzekering - CSS - som | Frederiquebonink | 12,554 Kb |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
Realistic Buttons | Stoypenny | 2,248 Kb |
CSS Hover Effects | Alen | 3,613 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!