I have a code for a line chart with a dropdown selection to change years and it works, but I want to add in my options and plugins. I just can't figure out exactly where to put it so that the chart accepts them though.
I have the following code, which I got from the answer here. The code works but just doesn't accept my options and I'd like it not to have fill or circles (I've tried a few things but none seem to work).
const options = {
scales: {
yAxes: [{
display: true,
ticks: {
beginAtZero: true,
steps: 8,
stepValue: 2,
max: 20,
min: 4
}
}]
},
//add plugins of boxes and labels with definitions for where they go
plugins: {
datalabels: {
display: false,
},
autocolors: false,
annotation: {
annotations: {
box1: {
drawTime: "beforeDatasetsDraw",
type: 'box',
yMin: 15,
yMax: 20,
backgroundColor: 'rgb(230, 90, 90)'
},
box2: {
drawTime: "beforeDatasetsDraw",
type: 'box',
yMin: 10,
yMax: 15,
backgroundColor: 'rgb(235, 170, 80)'
},
label1: {
type: 'label',
position: 'center',
yValue: 17.5,
content: ['Moderate Flooding'],
font: {
size: 14
}
},
label2: {
type: 'label',
position: 'center',
yValue: 12.5,
content: ['Minor Flooding'],
font: {
size: 14
}
}}}}};
var ctx = document.getElementById("myChart").getContext("2d");
var myData = {
'yr2022': {
method: 'Line',
data: {
labels: ["1/1", "1/2", "1/3", "1/4", "1/5", "1/6", "1/7", "1/8", "1/9", "1/10", "1/11", "1/12", "1/13", "1/14", "1/15", "1/16", "1/17", "1/18", "1/19", "1/20", "1/21", "1/22", "1/23", "1/24", "1/25", "1/26", "1/27", "1/28", "1/29", "1/30", "1/31", "2/1", "2/2", "2/3", "2/4", "2/5", "2/6", "2/7", "2/8", "2/9", "2/10", "2/11", "2/12", "2/13", "2/14", "2/15", "2/16", "2/17", "2/18", "2/19", "2/20", "2/21", "2/22", "2/23", "2/24", "2/25", "2/26", "2/27", "2/28", "3/1", "3/2", "3/3", "3/4", "3/5", "3/6", "3/7", "3/8", "3/9", "3/10", "3/11", "3/12", "3/13", "3/14", "3/15", "3/16", "3/17", "3/18", "3/19", "3/20", "3/21", "3/22", "3/23", "3/24", "3/25", "3/26", "3/27", "3/28", "3/29", "3/30", "3/31", "4/1", "4/2", "4/3", "4/4", "4/5", "4/6", "4/7", "4/8", "4/9", "4/10", "4/11", "4/12", "4/13", "4/14", "4/15", "4/16", "4/17", "4/18", "4/19", "4/20", "4/21", "4/22", "4/23", "4/24", "4/25", "4/26", "4/27", "4/28", "4/29", "4/30", "5/1", "5/2", "5/3", "5/4", "5/5", "5/6", "5/7", "5/8", "5/9", "5/10", "5/11", "5/12","5/13", "5/14", "5/15", "5/16", "5/17", "5/18", "5/19", "5/20", "5/21", "5/22", "5/23", "5/24", "5/25", "5/26", "5/27", "5/28", "5/29", "5/30", "5/31", "6/1", "6/2", "6/3", "6/4", "6/5", "6/6","6/7","6/8", "6/9", "6/10", "6/11", "6/12", "6/13", "6/14", "6/15", "6/16", "6/17", "6/18", "6/19", "6/20", "6/21", "6/22", "6/23", "6/24", "6/25", "6/26", "6/27", "6/28", "6/29", "6/30", "7/1", "7/2", "7/3", "7/4", "7/5", "7/6", "7/7", "7/8", "7/9", "7/10", "7/11", "7/12", "7/13", "7/14", "7/15", "7/16", "7/17", "7/18", "7/19", "7/20", "7/21", "7/22", "7/23", "7/24", "7/25", "7/26", "7/27", "7/28", "7/29", "7/30", "7/31", "8/1", "8/2", "8/3", "8/4", "8/5", "8/6", "8/7", "8/8", "8/9", "8/10", "8/11", "8/12", "8/13", "8/14", "8/15", "8/16", "8/17", "8/18", "8/19", "8/20", "8/21", "8/22", "8/23", "8/24", "8/25", "8/26", "8/27", "8/28", "8/29", "8/30", "8/31", "9/1", "9/2", "9/3", "9/4", "9/5", "9/6", "9/7", "9/8", "9/9", "9/10", "9/11", "9/12", "9/13", "9/14", "9/15", "9/16", "9/17", "9/18", "9/19", "9/20", "9/21", "9/22", "9/23", "9/24", "9/25", "9/26", "9/27", "9/28", "9/29", "9/30", "10/1", "10/2", "10/3", "10/4", "10/5", "10/6", "10/7", "10/8", "10/9", "10/10", "10/11", "10/12", "10/13", "10/14", "10/15", "10/16", "10/17", "10/18", "10/19", "10/20", "10/21", "10/22", "10/23", "10/24", "10/25", "10/26", "10/27", "10/28", "10/29", "10/30", "10/31", "11/1", "11/2", "11/3", "11/4", "11/5", "11/6", "11/7", "11/8", "11/9", "11/10", "11/11", "11/12", "11/13", "11/14", "11/15", "11/16", "11/17", "11/18", "11/19", "11/20", "11/21", "11/22", "11/23", "11/24", "11/25", "11/26", "11/27", "11/28", "11/29", "11/30","12/1","12/2","12/3","12/4","12/5","12/6","12/7","12/8","12/9","12/10","12/11","12/12","12/13","12/14","12/15","12/16","12/17","12/18","12/19","12/20","12/21","12/22","12/23","12/24","12/25","12/26","12/27","12/28","12/29","12/30","12/31"],
datasets: [{
label: "Averages",
label: "15-Year Avg Gage Height",
lineTension: 0,
strokeColor: "#3c4a7d",
fill: false,
radius: 0,
data: [5.59,5.65,5.62,5.7,5.67,5.7,5.72,5.69,5.7,5.66,5.64,5.59,5.62,5.62,5.65,5.66,5.67,5.65,5.62,5.65,5.65,5.64,5.72,5.72,5.72,5.7,5.71,5.7,5.73,5.73,5.69,5.65,5.67,5.7,5.71,5.72,5.73,5.71,5.71,5.7,5.64,5.71,5.73,5.68,5.67,5.69,5.67,5.65,5.68,5.68,5.68,5.68,5.67,5.66,5.66,5.66,5.65,5.65,5.65,5.66,5.71,5.71,5.66,5.64,5.65,5.66,5.66,5.68,5.66,5.64,5.67,5.73,5.71,5.69,5.68,5.68,5.68,5.68,5.68,5.7,5.68,5.72,5.67,5.68,5.67,5.65,5.67,5.77,5.75,5.67,5.65,5.66,5.65,5.64,5.67,5.67,5.66,5.67,5.68,5.66,5.66,5.72,5.68,5.67,5.66,5.73,5.88,5.73,5.7,5.69,5.71,5.7,5.69,5.68,5.68,5.69,5.71,5.69,5.71,5.66,5.65,5.63,5.62,5.65,5.71,5.62,5.67,5.64,5.75,5.73,5.72,5.74,5.7,5.68,5.65,5.69,5.72,5.71,5.67,5.7,5.66,5.64,5.69,5.84,5.81,5.75,5.75,5.88,5.7,5.68,5.72,5.73,5.88,5.72,5.72,5.73,5.68,5.68,5.72,5.77,5.73,5.67,5.68,5.72,5.76,5.76,5.69,5.73,5.66,5.76,5.77,5.71,5.69,5.68,5.76,5.78,5.82,5.81,5.78,5.71,5.74,5.65,5.71,5.71,5.56,5.25,5.23,5.07,5.25,5.64,5.45,5.41,5.36,5.57,5.66,5.57,5.37,5.56,5.46,5.41,5.4,5.39,5.39,5.37,5.34,5.4,5.3,5.24,5.15,5.11,5.19,4.97,5.08,4.99,4.97,4.97,4.98,4.98,5.05,5.37,5.44,5.37,5.24,5.04,5.09,5.19,5.46,5.35,5.37,5.41,5.26,5.15,5.46,5.43,5.39,5.37,5.63,5.71,5.66,5.65,5.68,5.83,5.69,5.41,5.26,5.29,5.61,5.62,5.65,5.6,5.55,5.51,5.51,5.47,5.53,5.54,5.51,5.56,5.63,5.65,5.34,5.29,5.34,5.36,5.61,5.42,5.61,5.56,5.38,5.44,5.38,5.34,5.26,5.31,5.42,5.44,5.42,5.53,5.61,5.37,5.7,5.68,5.63,5.62,5.62,5.64,5.62,5.62,5.59,5.61,5.58,5.6,5.58,5.61,5.58,5.55,5.59,5.56,5.55,5.65,5.61,5.59,5.58,5.57,5.54,5.58,5.56,5.57,5.54,5.62,5.66,5.56,5.56,5.54,5.57,5.61,5.64,5.6,5.64,5.6,5.57,5.58,5.6,5.59,5.6,5.62,5.61,5.64,5.64,5.62,5.62,5.59,5.59,5.58,5.59,5.58,5.59,5.64,5.64,5.64,5.64,5.64,5.64,5.65,5.71,5.66,5.61,5.65,5.7,5.69,5.64,5.62,5.62,5.7,5.66,5.66,5.68,5.67,5.61,5.66,5.61,5.61,5.67,5.68,5.65]
}, {
label: "2022",
strokeColor: "rgba(151,187,205,0.8)",
fill: false,
pointRadius: 0,
data: [6.03,6.06,6,6.01,6.01,6.01,6,5.99,6.01,5.99,5.97,5.99,5.99,5.97,5.96,6.02,6.07,6.06,6.02,6.02,6.05,6.03,6.06,6.06,6.06,6.06,6.05,6.03,6.05,6.07,6.08,6.06,6.06,6.14,6.14,6.09,6.05,6.07,6.05,6.05,6.05,6.03,6.03,6.03,6.05,6.07,6.07,6.05,6.08,6.09,6.06,6.07,6.09,6.12,6.1,6.09,6.08,6.08,6.08,6.08,6.07,6.06,6.07,6.06,6.05,6.08,6.08,6.07,6.06,6.06,6.07,6.07,6.06,6.05,6.06,6.04,6.05,6.07,6.07,6.35,6.19,6.04,5.99,5.95,5.93,5.91,5.9,5.88,5.86,5.93,5.93,5.91,5.9,5.9,5.89,5.86,5.87,5.89,5.89,5.87,5.87,5.86,5.86,5.86,5.88,5.86,5.89,5.87,5.86,5.86,5.85,5.87,5.86,5.85,5.93,5.87,5.84,5.81,5.77,5.75,5.74,5.73,5.72,5.74,5.72,5.71,5.71,5.7,5.68,5.68,5.7,5.67,5.67,5.67,5.66,5.68,5.68,5.67,5.67,5.67,5.66,5.68,5.7,6.5,6.03,5.75,5.7,5.68,5.64,5.65,5.64,5.66,6.14,5.88,5.84,5.83,null,5.79,5.79,5.79,5.92,5.83,5.81,5.81,5.8,5.8,5.8,5.79,5.79,5.79,5.79,5.79,5.79,5.79,5.79,5.79,5.84,5.84,5.85,5.85,5.8,5.8,5.79,5.78,5.8,5.8,5.83,5.85,5.78,5.82,5.8,5.75,5.8,5.78,5.77,5.76,5.77,5.79,5.79,5.8,5.79,5.97,6.05,5.87,5.82,5.77,5.66,5.66,5.81,6.19,7.73,5.83,5.68,5.62,5.61,5.79,6.07,5.81,5.81,5.82,6,5.72,5.73,5.69,5.68,5.67,5.67,5.67,5.67,5.85,5.73,5.73,6.06,5.88,5.72,5.67,5.66,5.65,5.65,5.64,5.95,6.72,5.78,5.68,5.63,5.61,5.6,5.58,5.57,5.55,5.54,5.53,5.51,5.52,5.52,5.51,5.49,5.49,5.48,5.46,5.47,5.47,5.46,5.46,5.44,5.45,5.45,5.44,5.44,5.44,5.44,5.43,5.43,5.43,5.43,5.42,5.42,5.43,5.44,5.44,5.47,5.47,5.46,5.44,5.42,5.43,5.42,5.42,5.45,5.46,5.45,5.45,5.46,5.46,5.44,5.43,5.83,5.93,5.59,5.5,5.47,5.44,5.43,5.42,5.4,5.4,5.39,5.39,5.4,5.38,5.39,5.38,5.38,5.38,5.37,5.38,5.38,5.38,5.39,5.39,5.39,5.39,5.39,5.39,5.4,5.4,5.4,5.39,5.41,5.53,5.57,5.59,5.57,5.58,5.58,5.54,5.5,5.61,5.62,5.66,5.68,5.65,5.64,5.66,5.64,5.66,5.67,5.65,5.67,5.65,5.61,5.63,5.7,5.67,5.7,5.7,5.67,5.69,5.7,5.72,5.72,5.73,5.68,5.69,5.68]
}],
}
},
'yr2021': {
method: 'Line',
data: {
labels: ["1/1", "1/2", "1/3", "1/4", "1/5", "1/6", "1/7", "1/8", "1/9", "1/10", "1/11", "1/12", "1/13", "1/14", "1/15", "1/16", "1/17", "1/18", "1/19", "1/20", "1/21", "1/22", "1/23", "1/24", "1/25", "1/26", "1/27", "1/28", "1/29", "1/30", "1/31", "2/1", "2/2", "2/3", "2/4", "2/5", "2/6", "2/7", "2/8", "2/9", "2/10", "2/11", "2/12", "2/13", "2/14", "2/15", "2/16", "2/17", "2/18", "2/19", "2/20", "2/21", "2/22", "2/23", "2/24", "2/25", "2/26", "2/27", "2/28", "3/1", "3/2", "3/3", "3/4", "3/5", "3/6", "3/7", "3/8", "3/9", "3/10", "3/11", "3/12", "3/13", "3/14", "3/15", "3/16", "3/17", "3/18", "3/19", "3/20", "3/21", "3/22", "3/23", "3/24", "3/25", "3/26", "3/27", "3/28", "3/29", "3/30", "3/31", "4/1", "4/2", "4/3", "4/4", "4/5", "4/6", "4/7", "4/8", "4/9", "4/10", "4/11", "4/12", "4/13", "4/14", "4/15", "4/16", "4/17", "4/18", "4/19", "4/20", "4/21", "4/22", "4/23", "4/24", "4/25", "4/26", "4/27", "4/28", "4/29", "4/30", "5/1", "5/2", "5/3", "5/4", "5/5", "5/6", "5/7", "5/8", "5/9", "5/10", "5/11", "5/12","5/13", "5/14", "5/15", "5/16", "5/17", "5/18", "5/19", "5/20", "5/21", "5/22", "5/23", "5/24", "5/25", "5/26", "5/27", "5/28", "5/29", "5/30", "5/31", "6/1", "6/2", "6/3", "6/4", "6/5", "6/6","6/7","6/8", "6/9", "6/10", "6/11", "6/12", "6/13", "6/14", "6/15", "6/16", "6/17", "6/18", "6/19", "6/20", "6/21", "6/22", "6/23", "6/24", "6/25", "6/26", "6/27", "6/28", "6/29", "6/30", "7/1", "7/2", "7/3", "7/4", "7/5", "7/6", "7/7", "7/8", "7/9", "7/10", "7/11", "7/12", "7/13", "7/14", "7/15", "7/16", "7/17", "7/18", "7/19", "7/20", "7/21", "7/22", "7/23", "7/24", "7/25", "7/26", "7/27", "7/28", "7/29", "7/30", "7/31", "8/1", "8/2", "8/3", "8/4", "8/5", "8/6", "8/7", "8/8", "8/9", "8/10", "8/11", "8/12", "8/13", "8/14", "8/15", "8/16", "8/17", "8/18", "8/19", "8/20", "8/21", "8/22", "8/23", "8/24", "8/25", "8/26", "8/27", "8/28", "8/29", "8/30", "8/31", "9/1", "9/2", "9/3", "9/4", "9/5", "9/6", "9/7", "9/8", "9/9", "9/10", "9/11", "9/12", "9/13", "9/14", "9/15", "9/16", "9/17", "9/18", "9/19", "9/20", "9/21", "9/22", "9/23", "9/24", "9/25", "9/26", "9/27", "9/28", "9/29", "9/30", "10/1", "10/2", "10/3", "10/4", "10/5", "10/6", "10/7", "10/8", "10/9", "10/10", "10/11", "10/12", "10/13", "10/14", "10/15", "10/16", "10/17", "10/18", "10/19", "10/20", "10/21", "10/22", "10/23", "10/24", "10/25", "10/26", "10/27", "10/28", "10/29", "10/30", "10/31", "11/1", "11/2", "11/3", "11/4", "11/5", "11/6", "11/7", "11/8", "11/9", "11/10", "11/11", "11/12", "11/13", "11/14", "11/15", "11/16", "11/17", "11/18", "11/19", "11/20", "11/21", "11/22", "11/23", "11/24", "11/25", "11/26", "11/27", "11/28", "11/29", "11/30","12/1","12/2","12/3","12/4","12/5","12/6","12/7","12/8","12/9","12/10","12/11","12/12","12/13","12/14","12/15","12/16","12/17","12/18","12/19","12/20","12/21","12/22","12/23","12/24","12/25","12/26","12/27","12/28","12/29","12/30","12/31"],
datasets: [{
label: "Averages",
strokeColor: "rgba(220,220,220,0.8)",
fill: false,
pointRadius: 0,
data: [5.59,5.65,5.62,5.7,5.67,5.7,5.72,5.69,5.7,5.66,5.64,5.59,5.62,5.62,5.65,5.66,5.67,5.65,5.62,5.65,5.65,5.64,5.72,5.72,5.72,5.7,5.71,5.7,5.73,5.73,5.69,5.65,5.67,5.7,5.71,5.72,5.73,5.71,5.71,5.7,5.64,5.71,5.73,5.68,5.67,5.69,5.67,5.65,5.68,5.68,5.68,5.68,5.67,5.66,5.66,5.66,5.65,5.65,5.65,5.66,5.71,5.71,5.66,5.64,5.65,5.66,5.66,5.68,5.66,5.64,5.67,5.73,5.71,5.69,5.68,5.68,5.68,5.68,5.68,5.7,5.68,5.72,5.67,5.68,5.67,5.65,5.67,5.77,5.75,5.67,5.65,5.66,5.65,5.64,5.67,5.67,5.66,5.67,5.68,5.66,5.66,5.72,5.68,5.67,5.66,5.73,5.88,5.73,5.7,5.69,5.71,5.7,5.69,5.68,5.68,5.69,5.71,5.69,5.71,5.66,5.65,5.63,5.62,5.65,5.71,5.62,5.67,5.64,5.75,5.73,5.72,5.74,5.7,5.68,5.65,5.69,5.72,5.71,5.67,5.7,5.66,5.64,5.69,5.84,5.81,5.75,5.75,5.88,5.7,5.68,5.72,5.73,5.88,5.72,5.72,5.73,5.68,5.68,5.72,5.77,5.73,5.67,5.68,5.72,5.76,5.76,5.69,5.73,5.66,5.76,5.77,5.71,5.69,5.68,5.76,5.78,5.82,5.81,5.78,5.71,5.74,5.65,5.71,5.71,5.56,5.25,5.23,5.07,5.25,5.64,5.45,5.41,5.36,5.57,5.66,5.57,5.37,5.56,5.46,5.41,5.4,5.39,5.39,5.37,5.34,5.4,5.3,5.24,5.15,5.11,5.19,4.97,5.08,4.99,4.97,4.97,4.98,4.98,5.05,5.37,5.44,5.37,5.24,5.04,5.09,5.19,5.46,5.35,5.37,5.41,5.26,5.15,5.46,5.43,5.39,5.37,5.63,5.71,5.66,5.65,5.68,5.83,5.69,5.41,5.26,5.29,5.61,5.62,5.65,5.6,5.55,5.51,5.51,5.47,5.53,5.54,5.51,5.56,5.63,5.65,5.34,5.29,5.34,5.36,5.61,5.42,5.61,5.56,5.38,5.44,5.38,5.34,5.26,5.31,5.42,5.44,5.42,5.53,5.61,5.37,5.7,5.68,5.63,5.62,5.62,5.64,5.62,5.62,5.59,5.61,5.58,5.6,5.58,5.61,5.58,5.55,5.59,5.56,5.55,5.65,5.61,5.59,5.58,5.57,5.54,5.58,5.56,5.57,5.54,5.62,5.66,5.56,5.56,5.54,5.57,5.61,5.64,5.6,5.64,5.6,5.57,5.58,5.6,5.59,5.6,5.62,5.61,5.64,5.64,5.62,5.62,5.59,5.59,5.58,5.59,5.58,5.59,5.64,5.64,5.64,5.64,5.64,5.64,5.65,5.71,5.66,5.61,5.65,5.7,5.69,5.64,5.62,5.62,5.7,5.66,5.66,5.68,5.67,5.61,5.66,5.61,5.61,5.67,5.68,5.65]
}, {
label: "2021",
strokeColor: "rgba(151,187,205,0.8)",
fill: false,
pointRadius: 0,
data: [5.13,5.14,5.14,5.14,5.14,5.12,5.14,5.14,5.14,5.16,5.15,5.14,5.14,5.14,5.13,5.14,5.16,5.17,5.15,5.15,5.17,5.18,5.19,5.2,5.22,5.24,5.27,5.24,5.24,5.21,5.19,5.24,5.23,5.21,5.2,5.2,5.21,5.21,5.22,5.22,5.22,5.22,5.22,5.22,5.3,5.33,5.32,5.34,5.32,5.32,5.31,5.35,5.31,5.31,5.29,5.27,5.28,5.26,5.25,5.25,5.25,5.24,5.23,5.21,5.22,5.24,5.22,5.2,5.2,5.19,5.2,5.63,5.89,5.67,5.61,5.57,5.64,5.64,5.61,5.59,5.58,5.61,5.65,5.62,5.58,5.57,5.56,5.57,5.56,5.55,5.56,5.55,5.51,5.46,5.41,5.44,5.49,5.54,5.53,5.52,5.51,5.51,5.52,5.49,5.47,5.47,5.48,5.49,5.48,5.47,5.48,5.47,5.47,5.47,5.48,5.47,5.44,5.43,5.43,5.43,5.41,5.4,5.4,5.52,5.44,5.4,5.4,5.44,5.44,5.5,5.49,5.45,5.43,5.41,5.4,6.36,6.87,6.92,6.42,6.28,6.11,6.07,6.01,5.98,5.96,5.94,6.08,5.93,5.94,5.96,6.63,6.07,6.66,6.12,6.06,6.02,5.98,5.95,5.94,5.91,5.87,5.84,5.81,5.79,5.78,5.77,5.76,5.77,5.77,5.76,5.77,5.76,5.76,5.78,5.77,5.77,6.2,7.08,6.27,6.23,6.59,6.23,7.1,6.87,6.64,6.51,6.41,6.32,6.27,6.22,6.2,6.2,6.19,6.14,6.1,6.08,6.06,6.05,6.32,6.08,6.01,5.99,5.97,5.96,5.94,5.92,5.93,5.9,5.87,5.88,5.86,5.85,6.67,6.14,6.1,6.11,6.14,6.19,6.19,6.21,6.2,6.08,6.06,6.1,6.25,6.46,null,5.88,5.88,5.85,5.84,5.83,5.83,6.45,6.4,6.25,6.04,6.02,6.11,6.26,6.31,6.22,6,null,null,null,null,null,null,null,null,null,null,null,null,null,null,5.75,5.73,5.73,5.72,5.72,5.71,5.71,5.72,5.73,5.74,5.74,5.75,5.74,5.73,5.73,5.75,6.2,6.43,6.03,5.97,5.94,5.94,5.93,5.92,5.91,5.91,5.92,5.9,5.95,5.92,5.91,5.91,5.9,5.91,5.91,5.9,5.9,5.91,5.91,5.91,5.91,5.91,5.88,5.88,5.89,5.91,5.96,6,6.01,6,5.99,5.97,5.96,5.95,5.94,5.93,5.91,5.97,6,6,5.98,5.95,5.95,5.96,5.95,5.93,5.96,5.96,5.95,5.95,5.95,5.95,5.96,5.95,5.97,5.97,5.97,5.97,5.97,5.98,5.98,5.98,5.97,5.98,5.98,5.99,5.97,5.96,5.98,6.01,6,5.99,5.98,5.98,5.99,5.99,5.99,5.99,5.99,6,6.01,6.01,6.03,6.04,6.04,6.03,6.03,6.03]
}],
}
}
};
function updateChart() {
var determineChart = $("#chartType").val();
var params = myData[determineChart]
myChart = new Chart(ctx)[params.method](params.data);
}
$('#chartType').on('change', updateChart)
updateChart();