much simpler annotations spacing, and works better - just use 4 vert levels all left-aligned, not moving x offset every 2nd
This commit is contained in:
@@ -213,9 +213,6 @@
|
|||||||
// the al, x, offset are used to make the altenrate annotations be on slightly different vertical offsets (size is based on $'s)
|
// the al, x, offset are used to make the altenrate annotations be on slightly different vertical offsets (size is based on $'s)
|
||||||
// al alternates every 2 annotations left / right (so 2 left, then 2 right), x is just used to also move the label more left/right to get the connecting line
|
// al alternates every 2 annotations left / right (so 2 left, then 2 right), x is just used to also move the label more left/right to get the connecting line
|
||||||
var offset=13
|
var offset=13
|
||||||
var al='left'
|
|
||||||
var x=-130
|
|
||||||
var done=0
|
|
||||||
{% if not COMP %}
|
{% if not COMP %}
|
||||||
// Add annotations for changes greater than 5000
|
// Add annotations for changes greater than 5000
|
||||||
{% for a in finance['annotations'] %}
|
{% for a in finance['annotations'] %}
|
||||||
@@ -228,18 +225,12 @@
|
|||||||
xAxis: 0,
|
xAxis: 0,
|
||||||
yAxis: 0
|
yAxis: 0
|
||||||
},
|
},
|
||||||
x: x,
|
x: -70,
|
||||||
y: offset,
|
y: offset,
|
||||||
align: al,
|
|
||||||
text: '{{a['label']}}'
|
text: '{{a['label']}}'
|
||||||
}], labelOptions: { allowOverlap: true }
|
}], labelOptions: { allowOverlap: true }
|
||||||
});
|
});
|
||||||
if( offset == 150 ) { offset=100 } else { offset=150 }
|
offset = ({{loop.index}} * 50 % 200) +50
|
||||||
if( done == 2 ) {
|
|
||||||
if( al=='right' ) { al='left'; x=-130 } else { al='right'; x=130 }
|
|
||||||
done=0
|
|
||||||
}
|
|
||||||
done++
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
document.keep = annotations
|
document.keep = annotations
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user