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
0d5fefe6
Commit
0d5fefe6
authored
Feb 03, 2021
by
Rodrigo Tapia-McClung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cursor not showing for first month on area chart
parent
70d8e48c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
cuerpos_charts.js
public/js/cuerpos_charts.js
+5
-8
No files found.
public/js/cuerpos_charts.js
View file @
0d5fefe6
...
...
@@ -195,7 +195,7 @@ const makeRadarChart = (data, months, years) => {
makeRadarRange
(
radarCategoryAxis
,
"septiembre"
,
"diciembre"
,
radarRangeColors
[
3
],
3
);
makeRadarRange
(
radarCategoryAxis
,
"diciembre"
,
"diciembre"
,
radarRangeColors
[
0
],
1
);
radarChart
.
cursor
=
new
am4charts
.
RadarCursor
();
//FIXME: cursors are offset
radarChart
.
cursor
=
new
am4charts
.
RadarCursor
();
// add line legend
radarChart
.
legend
=
new
am4charts
.
Legend
();
...
...
@@ -263,7 +263,6 @@ const makeLineChart = (data) => {
const
makeAreaChart
=
(
data
)
=>
{
let
areaChart
=
am4core
.
create
(
"areaChart"
,
am4charts
.
XYChart
);
let
areaTitle
=
areaChart
.
titles
.
create
();
areaTitle
.
text
=
"Superficie acumulada"
;
areaTitle
.
fontSize
=
10
;
...
...
@@ -272,13 +271,12 @@ const makeAreaChart = (data) => {
areaChart
.
data
=
data
;
// chart.dateFormatter.inputDateFormat = "dd-mm-yyyy";
let
areaDateAxis
=
areaChart
.
xAxes
.
push
(
new
am4charts
.
DateAxis
());
areaDateAxis
.
renderer
.
minGridDistance
=
6
0
;
areaDateAxis
.
renderer
.
minGridDistance
=
5
0
;
areaDateAxis
.
fontSize
=
10
;
areaDateAxis
.
renderer
.
labels
.
template
.
fill
=
am4core
.
color
(
mainTextColor
);
areaDateAxis
.
startLocation
=
0.5
;
areaDateAxis
.
endLocation
=
0.5
;
areaDateAxis
.
startLocation
=
0.
4
5
;
areaDateAxis
.
endLocation
=
0.5
5
;
areaDateAxis
.
baseInterval
=
{
timeUnit
:
"month"
,
count
:
1
...
...
@@ -302,8 +300,7 @@ const makeAreaChart = (data) => {
makeDateRange
(
areaDateAxis
,
11
,
1
,
"#E1DBC8"
);
areaChart
.
cursor
=
new
am4charts
.
XYCursor
();
areaChart
.
snapToSeries
=
areaSeries2
;
areaChart
.
cursor
.
xAxis
=
areaDateAxis
;
//areaChart.cursor.xAxis = areaDateAxis;
areaChart
.
scrollbarX
=
new
am4core
.
Scrollbar
();
areaChart
.
scrollbarX
.
minHeight
=
1
;
areaChart
.
scrollbarX
.
parent
=
areaChart
.
bottomAxesContainer
;
...
...
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