Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fordecyt_2019
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rodrigo Tapia-McClung
fordecyt_2019
Commits
ea4af734
Commit
ea4af734
authored
Feb 02, 2021
by
Rodrigo Tapia-McClung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trying to fix radar legend. Fix font sizes
parent
0fbf175e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
cuerpos_charts.js
public/js/cuerpos_charts.js
+11
-11
No files found.
public/js/cuerpos_charts.js
View file @
ea4af734
...
@@ -71,7 +71,7 @@ const makeRadarRange = (axis, start, end, color, span) => {
...
@@ -71,7 +71,7 @@ const makeRadarRange = (axis, start, end, color, span) => {
const
makeLineAxisAndSeries
=
(
chart
,
field
,
name
,
opposite
,
bullet
)
=>
{
const
makeLineAxisAndSeries
=
(
chart
,
field
,
name
,
opposite
,
bullet
)
=>
{
let
lineValueAxis
=
chart
.
yAxes
.
push
(
new
am4charts
.
ValueAxis
());
let
lineValueAxis
=
chart
.
yAxes
.
push
(
new
am4charts
.
ValueAxis
());
lineValueAxis
.
fontSize
=
8
;
lineValueAxis
.
fontSize
=
10
;
if
(
chart
.
yAxes
.
indexOf
(
lineValueAxis
)
!=
0
)
{
if
(
chart
.
yAxes
.
indexOf
(
lineValueAxis
)
!=
0
)
{
lineValueAxis
.
syncWithAxis
=
chart
.
yAxes
.
getIndex
(
0
);
lineValueAxis
.
syncWithAxis
=
chart
.
yAxes
.
getIndex
(
0
);
...
@@ -85,7 +85,7 @@ const makeLineAxisAndSeries = (chart, field, name, opposite, bullet) => {
...
@@ -85,7 +85,7 @@ const makeLineAxisAndSeries = (chart, field, name, opposite, bullet) => {
lineSeries
.
name
=
name
;
lineSeries
.
name
=
name
;
//series.tooltipText = "{name}: [bold]{valueY.formatNumber('#,###.0')} Ha[/]";
//series.tooltipText = "{name}: [bold]{valueY.formatNumber('#,###.0')} Ha[/]";
lineSeries
.
tooltipText
=
"[bold]{name}: [/]{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
.
tensionX
=
0.8
;
lineSeries
.
showOnInit
=
true
;
lineSeries
.
showOnInit
=
true
;
...
@@ -159,7 +159,7 @@ const makeRadarChart = (data, months, years) => {
...
@@ -159,7 +159,7 @@ const makeRadarChart = (data, months, years) => {
/* Create axes */
/* Create axes */
let
radarCategoryAxis
=
radarChart
.
xAxes
.
push
(
new
am4charts
.
CategoryAxis
());
let
radarCategoryAxis
=
radarChart
.
xAxes
.
push
(
new
am4charts
.
CategoryAxis
());
radarCategoryAxis
.
dataFields
.
category
=
"month"
;
radarCategoryAxis
.
dataFields
.
category
=
"month"
;
radarCategoryAxis
.
fontSize
=
9
;
radarCategoryAxis
.
fontSize
=
10
;
radarCategoryAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
radarCategoryAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
radarCategoryAxis
.
renderer
.
grid
.
template
.
stroke
=
am4core
.
color
(
mainTextColor
);
radarCategoryAxis
.
renderer
.
grid
.
template
.
stroke
=
am4core
.
color
(
mainTextColor
);
...
@@ -168,7 +168,7 @@ const makeRadarChart = (data, months, years) => {
...
@@ -168,7 +168,7 @@ const makeRadarChart = (data, months, years) => {
radarValueAxis
.
extraMin
=
0.2
;
radarValueAxis
.
extraMin
=
0.2
;
radarValueAxis
.
extraMax
=
0.2
;
radarValueAxis
.
extraMax
=
0.2
;
radarValueAxis
.
tooltip
.
disabled
=
true
;
radarValueAxis
.
tooltip
.
disabled
=
true
;
radarValueAxis
.
fontSize
=
9
;
radarValueAxis
.
fontSize
=
10
;
radarValueAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
radarValueAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
radarValueAxis
.
renderer
.
grid
.
template
.
stroke
=
am4core
.
color
(
mainTextColor
);
radarValueAxis
.
renderer
.
grid
.
template
.
stroke
=
am4core
.
color
(
mainTextColor
);
//radarValueAxis.renderer.labels.template.fontSize = 15;
//radarValueAxis.renderer.labels.template.fontSize = 15;
...
@@ -200,8 +200,8 @@ const makeRadarChart = (data, months, years) => {
...
@@ -200,8 +200,8 @@ const makeRadarChart = (data, months, years) => {
// add line legend
// add line legend
radarChart
.
legend
=
new
am4charts
.
Legend
();
radarChart
.
legend
=
new
am4charts
.
Legend
();
//
radarChart.legend.fontSize = 10;
radarChart
.
legend
.
fontSize
=
10
;
radarChart
.
legend
.
fontSize
=
9
;
//
radarChart.legend.fontSize = 9;
radarChart
.
legend
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
radarChart
.
legend
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
radarChart
.
legend
.
itemContainers
.
template
.
paddingTop
=
0
;
radarChart
.
legend
.
itemContainers
.
template
.
paddingTop
=
0
;
radarChart
.
legend
.
itemContainers
.
template
.
paddingBottom
=
0
;
radarChart
.
legend
.
itemContainers
.
template
.
paddingBottom
=
0
;
...
@@ -221,8 +221,8 @@ const makeRadarChart = (data, months, years) => {
...
@@ -221,8 +221,8 @@ const makeRadarChart = (data, months, years) => {
markerTemplate
.
width
=
20
;
markerTemplate
.
width
=
20
;
markerTemplate
.
height
=
20
;
markerTemplate
.
height
=
20
;
radarChart
.
legend
.
itemContainers
.
template
.
paddingTop
=
0
;
radarChart
.
legend
.
itemContainers
.
template
.
paddingTop
=
0
;
radarChart
.
legend
.
itemContainers
.
template
.
paddingRight
=
-
10
;
//
radarChart.legend.itemContainers.template.paddingRight = -10;
radarChart
.
legend
.
itemContainers
.
template
.
paddingLeft
=
-
10
;
//
radarChart.legend.itemContainers.template.paddingLeft = -10;
}
}
...
@@ -239,7 +239,7 @@ const makeLineChart = (data) => {
...
@@ -239,7 +239,7 @@ const makeLineChart = (data) => {
let
lineDateAxis
=
lineChart
.
xAxes
.
push
(
new
am4charts
.
DateAxis
());
let
lineDateAxis
=
lineChart
.
xAxes
.
push
(
new
am4charts
.
DateAxis
());
lineDateAxis
.
renderer
.
minGridDistance
=
50
;
lineDateAxis
.
renderer
.
minGridDistance
=
50
;
lineDateAxis
.
fontSize
=
8
;
lineDateAxis
.
fontSize
=
10
;
lineDateAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
lineDateAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
// Create series
// Create series
...
@@ -278,7 +278,7 @@ const makeAreaChart = (data) => {
...
@@ -278,7 +278,7 @@ const makeAreaChart = (data) => {
// chart.dateFormatter.inputDateFormat = "dd-mm-yyyy";
// chart.dateFormatter.inputDateFormat = "dd-mm-yyyy";
let
areaDateAxis
=
areaChart
.
xAxes
.
push
(
new
am4charts
.
DateAxis
());
let
areaDateAxis
=
areaChart
.
xAxes
.
push
(
new
am4charts
.
DateAxis
());
areaDateAxis
.
renderer
.
minGridDistance
=
60
;
areaDateAxis
.
renderer
.
minGridDistance
=
60
;
areaDateAxis
.
fontSize
=
8
;
areaDateAxis
.
fontSize
=
10
;
areaDateAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
areaDateAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
areaDateAxis
.
startLocation
=
0.5
;
areaDateAxis
.
startLocation
=
0.5
;
areaDateAxis
.
endLocation
=
0.5
;
areaDateAxis
.
endLocation
=
0.5
;
...
@@ -289,7 +289,7 @@ const makeAreaChart = (data) => {
...
@@ -289,7 +289,7 @@ const makeAreaChart = (data) => {
let
areaValueAxis
=
areaChart
.
yAxes
.
push
(
new
am4charts
.
ValueAxis
());
let
areaValueAxis
=
areaChart
.
yAxes
.
push
(
new
am4charts
.
ValueAxis
());
areaValueAxis
.
tooltip
.
disabled
=
true
;
areaValueAxis
.
tooltip
.
disabled
=
true
;
areaValueAxis
.
fontSize
=
8
;
areaValueAxis
.
fontSize
=
10
;
areaValueAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
areaValueAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
// Create series
// Create series
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment