FusionCharts - Annotation Shapes: Image scaling

Created using FusionCharts Suite XT - www.fusioncharts.com

by FusionCharts

HTML

<script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
<script src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"></script>
<!-- The rectangle drawn to highlight the lowest footfall is created using the path annotation. -->
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function() {
  var revenueChart = new FusionCharts({
    type: 'spline',
    renderAt: 'chart-container',
    width: '400',
    height: '300',
    dataFormat: 'json',
    dataSource: {
      "chart": {
        "caption": "Total footfall in Bakersfield Central",
        "subCaption": "Last week",
        "xAxisName": "Day",
        "yAxisName": "No. of Visitors",
        "showValues": "1",
        "theme": "fusion"
      },
      "annotations": {
        "origw": "400",
        "origh": "300",
        "autoscale": "1"

      },
      "data": [{
        "label": "Mon",
        "value": "15123"
      }, {
        "label": "Tue",
        "value": "14233"
      }, {
        "label": "Wed",
        "value": "25507"
      }, {
        "label": "Thu",
        "value": "9110"
      }, {
        "label": "Fri",
        "value": "15529"
      }, {
        "label": "Sat",
        "value": "20803"
      }, {
        "label": "Sun",
        "value": "19202"
      }]
    },
    events: {
      "beforeRender": function(evt, args) {
        var chartRef = evt.sender,
          createGroupItems = function() {
            var annotations = chartRef.annotations;

            // Adding a group, "totalFootfall"
            annotations.addGroup({
              'id': 'totalFootfall'
            });

            //Adding rectangle annotation item to the annotation group
            annotations.addItem('totalFootfall', {
              "id": "dyn-labelBG",
              "type": "rectangle",
              "radius": "3",
              "x": "$canvasEndX - 100",
              "y": "$canvasStartY",
              "tox": "$canvasEndX",
              "toy": "$canvasStartY + 30",
              "color": "#0075c2",
              "alpha": "70"
            }, true);

            // Adding text annotation item to the annotation group
            annotations.addItem('totalFootfall', {
              "id": "dyn-label",
              "type": "text",
              "text": "Total:...