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

Trying to fix radar legend. Fix font sizes

parent 0fbf175e
......@@ -71,7 +71,7 @@ const makeRadarRange = (axis, start, end, color, span) => {
const makeLineAxisAndSeries = (chart, field, name, opposite, bullet) => {
let lineValueAxis = chart.yAxes.push(new am4charts.ValueAxis());
lineValueAxis.fontSize = 8;
lineValueAxis.fontSize = 10;
if (chart.yAxes.indexOf(lineValueAxis) != 0) {
lineValueAxis.syncWithAxis = chart.yAxes.getIndex(0);
......@@ -85,7 +85,7 @@ const makeLineAxisAndSeries = (chart, field, name, opposite, bullet) => {
lineSeries.name = name;
//series.tooltipText = "{name}: [bold]{valueY.formatNumber('#,###.0')} Ha[/]";
lineSeries.tooltipText = "[bold]{name}: [/]{valueY.formatNumber('#,###.0')} Ha[/]";
lineSeries.tooltipText.fontSize = 8;
lineSeries.tooltipText.fontSize = 10;
lineSeries.tensionX = 0.8;
lineSeries.showOnInit = true;
......@@ -159,7 +159,7 @@ const makeRadarChart = (data, months, years) => {
/* Create axes */
let radarCategoryAxis = radarChart.xAxes.push(new am4charts.CategoryAxis());
radarCategoryAxis.dataFields.category = "month";
radarCategoryAxis.fontSize = 9;
radarCategoryAxis.fontSize = 10;
radarCategoryAxis.renderer.labels.template.fill = am4core.color(mainTextColor);
radarCategoryAxis.renderer.grid.template.stroke = am4core.color(mainTextColor);
......@@ -168,7 +168,7 @@ const makeRadarChart = (data, months, years) => {
radarValueAxis.extraMin = 0.2;
radarValueAxis.extraMax = 0.2;
radarValueAxis.tooltip.disabled = true;
radarValueAxis.fontSize = 9;
radarValueAxis.fontSize = 10;
radarValueAxis.renderer.labels.template.fill = am4core.color(mainTextColor);
radarValueAxis.renderer.grid.template.stroke = am4core.color(mainTextColor);
//radarValueAxis.renderer.labels.template.fontSize = 15;
......@@ -200,8 +200,8 @@ const makeRadarChart = (data, months, years) => {
// add line legend
radarChart.legend = new am4charts.Legend();
//radarChart.legend.fontSize = 10;
radarChart.legend.fontSize = 9;
radarChart.legend.fontSize = 10;
//radarChart.legend.fontSize = 9;
radarChart.legend.labels.template.fill = am4core.color(mainTextColor);
radarChart.legend.itemContainers.template.paddingTop = 0;
radarChart.legend.itemContainers.template.paddingBottom = 0;
......@@ -221,8 +221,8 @@ const makeRadarChart = (data, months, years) => {
markerTemplate.width = 20;
markerTemplate.height = 20;
radarChart.legend.itemContainers.template.paddingTop = 0;
radarChart.legend.itemContainers.template.paddingRight = -10;
radarChart.legend.itemContainers.template.paddingLeft = -10;
//radarChart.legend.itemContainers.template.paddingRight = -10;
//radarChart.legend.itemContainers.template.paddingLeft = -10;
}
......@@ -239,7 +239,7 @@ const makeLineChart = (data) => {
let lineDateAxis = lineChart.xAxes.push(new am4charts.DateAxis());
lineDateAxis.renderer.minGridDistance = 50;
lineDateAxis.fontSize = 8;
lineDateAxis.fontSize = 10;
lineDateAxis.renderer.labels.template.fill = am4core.color(mainTextColor);
// Create series
......@@ -278,7 +278,7 @@ const makeAreaChart = (data) => {
// chart.dateFormatter.inputDateFormat = "dd-mm-yyyy";
let areaDateAxis = areaChart.xAxes.push(new am4charts.DateAxis());
areaDateAxis.renderer.minGridDistance = 60;
areaDateAxis.fontSize = 8;
areaDateAxis.fontSize = 10;
areaDateAxis.renderer.labels.template.fill = am4core.color(mainTextColor);
areaDateAxis.startLocation = 0.5;
areaDateAxis.endLocation = 0.5;
......@@ -289,7 +289,7 @@ const makeAreaChart = (data) => {
let areaValueAxis = areaChart.yAxes.push(new am4charts.ValueAxis());
areaValueAxis.tooltip.disabled = true;
areaValueAxis.fontSize = 8;
areaValueAxis.fontSize = 10;
areaValueAxis.renderer.labels.template.fill = am4core.color(mainTextColor);
// Create series
......
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