diff --git a/templates/index.html b/templates/index.html index 397d58a..66aa910 100644 --- a/templates/index.html +++ b/templates/index.html @@ -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) // 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 al='left' - var x=-130 - var done=0 {% if not COMP %} // Add annotations for changes greater than 5000 {% for a in finance['annotations'] %} @@ -228,18 +225,12 @@ xAxis: 0, yAxis: 0 }, - x: x, + x: -70, y: offset, - align: al, text: '{{a['label']}}' }], labelOptions: { allowOverlap: true } }); - if( offset == 150 ) { offset=100 } else { offset=150 } - if( done == 2 ) { - if( al=='right' ) { al='left'; x=-130 } else { al='right'; x=130 } - done=0 - } - done++ + offset = ({{loop.index}} * 50 % 200) +50 {% endfor %} document.keep = annotations {% endif %}