google.charts.load('current', {
packages: ['corechart']
}).then(function () {
var data = new google.visualization.DataTable({
"cols": [
{
"id": "Week",
"label": "Week",
"type": "string",
"pattern": null,
"p": null
},
{
"id": "Showings",
"label": "Showings",
"type": "number",
"pattern": null,
"p": null
},
{
"id": "Sytle",
"role": "style",
"type": "string",
"pattern": null,
"p": null
}
],
"rows": [
{
"c": [
{
"v": "1",
"f": null,
"p": null
},
{
"v": 2,
"f": null,
"p": null
},
{
"v": "point {fill-color: #ff7a06;}",
"f": null,
"p": null
}
]
},
{
"c": [
{
"v": "2",
"f": null,
"p": null
},
{
"v": 1,
"f": null,
"p": null
},
{
"v": null,
"f": null,
"p": null
}
]
}
]
});
let chart = new google.visualization.LineChart(document.getElementById('chart'));
chart.draw(data, {
title: "Showings by Week",
fontName: "Arial",
fontSize: 14,
titleTextStyle: {
color: "#2B557D"
},
pointSize: 6,
colors: ['#C6D9FD'],
lineWidth: 1,
curveType: "line",
vAxis: {
minValue:0,
viewWindow: {
min: 0
},
maxValue: 3
},
hAxis: {
maxAlternation: 1,
//title: 'Week'
},
legend: {
position: 'none'
},
tooltip: {
isHtml: true
},
animation:{
duration: 1500,
easing: 'out',
startup: true
}
});
});
<script src="https://www.gstatic.com/charts/loader.js"></script>
<div id="chart"></div>