Commit ef94540a authored by Rodrigo Tapia-McClung's avatar Rodrigo Tapia-McClung

Minor title correction and cleanup

parent b2533c5a
...@@ -7,12 +7,6 @@ ...@@ -7,12 +7,6 @@
/* globals am4core, am4charts, am4themes_animated, intervals*/ /* globals am4core, am4charts, am4themes_animated, intervals*/
//let amchart = am4core.registry.baseSprites.find(c => c.htmlContainer.id === "amchartdiv")
//let Chartdata = "http://localhost:8090/data/query/urbanization_year?columns=yeartrimes,area"
//data = d3.json(Chartdata).then(d => amchart.data = d)
//data = d3.json(Chartdata).then(data => console.log(data))
// amchart // amchart
am4core.ready(function() { am4core.ready(function() {
...@@ -23,7 +17,7 @@ am4core.ready(function() { ...@@ -23,7 +17,7 @@ am4core.ready(function() {
var chart = am4core.create("topChart", am4charts.XYChart); var chart = am4core.create("topChart", am4charts.XYChart);
let ctitle = chart.titles.create(); let ctitle = chart.titles.create();
ctitle.text = "Área urbanizada mensual"; ctitle.text = "Área urbanizada trimestralmente";
ctitle.fontSize = 15; ctitle.fontSize = 15;
//title.marginBottom = 30; //title.marginBottom = 30;
ctitle.fill = am4core.color(mainTextColor); ctitle.fill = am4core.color(mainTextColor);
...@@ -33,11 +27,9 @@ am4core.ready(function() { ...@@ -33,11 +27,9 @@ am4core.ready(function() {
let table = "urbanization_year"; let table = "urbanization_year";
let query = `${baseUrl}/query/${table}?columns=yeartrimes,sum(area)/10000 as area,date&group=yeartrimes,date&sort=yeartrimes`; let query = `${baseUrl}/query/${table}?columns=yeartrimes,sum(area)/10000 as area,date&group=yeartrimes,date&sort=yeartrimes`;
d3.json(query).then(d => chart.data = d); d3.json(query).then(d => chart.data = d);
//d3.json(query).then(d => pchart.data = d);
// d3.json(query).then(d => console.log(d));
// Create axes // Create axes
let xAxis = chart.xAxes.push(new am4charts.DateAxis()); //chart.xAxes.push(new am4charts.DateAxis()); let xAxis = chart.xAxes.push(new am4charts.DateAxis());
xAxis.baseInterval = { timeUnit: "month", count: 3 }; xAxis.baseInterval = { timeUnit: "month", count: 3 };
xAxis.renderer.labels.template.fill = am4core.color(mainTextColor); xAxis.renderer.labels.template.fill = am4core.color(mainTextColor);
xAxis.renderer.labels.template.fontSize = 15; xAxis.renderer.labels.template.fontSize = 15;
...@@ -212,10 +204,6 @@ am4core.ready(function() { ...@@ -212,10 +204,6 @@ am4core.ready(function() {
d3.json(query_r).then(d => rchart.data = d); d3.json(query_r).then(d => rchart.data = d);
//chart.padding(20, 20, 20, 20); //chart.padding(20, 20, 20, 20);
// var chart = am4core.create("chartdiv", am4charts.RadarChart);
//prepareDistanceData(data);
rchart.innerRadius = am4core.percent(15); rchart.innerRadius = am4core.percent(15);
rchart.radius = am4core.percent(90); rchart.radius = am4core.percent(90);
//chart.data = weeklyData; //chart.data = weeklyData;
...@@ -235,8 +223,6 @@ am4core.ready(function() { ...@@ -235,8 +223,6 @@ am4core.ready(function() {
dateAxis.renderer.labels.template.radius = am4core.percent(-57); dateAxis.renderer.labels.template.radius = am4core.percent(-57);
dateAxis.renderer.labels.template.fontSize = 12; dateAxis.renderer.labels.template.fontSize = 12;
dateAxis.renderer.labels.template.fill = am4core.color(mainTextColor); dateAxis.renderer.labels.template.fill = am4core.color(mainTextColor);
// dateAxis.dateFormats.setKey("month", "MMM");
// dateAxis.periodChangeDateFormats.setKey("month", "MMM");
dateAxis.cursorTooltipEnabled = false; dateAxis.cursorTooltipEnabled = false;
// dateAxis.calculateTotals = true; // dateAxis.calculateTotals = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment