0

Doesn't seem like it should be difficult, but none of my attempts have worked. Thanks a ton. Code found here, btw.

      <style>
      #chartdiv {
    width   : 100%;
    height  : 500px;
}                   
    </style>

  <script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<div id="chartdiv"></div>
    <script src="//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js"></script>

  <script src='https://code.jquery.com/jquery-1.11.2.min.js'></script>

    <script>
    var chart = AmCharts.makeChart( "chartdiv", {
  "type": "serial",
  "theme": "light",
   "depth3D": 20,
  "angle": 30,
  "dataProvider": [ {
    "name": "Income A",
    "open": 0,
    "close": 11.13,
    "close2": 14.13
  }, {
    "name": "Income B",
    "open": 11.13,
    "close": 15.81,
    "close2": 19
  }, {
    "name": "Total Income",
    "open": 5,
    "close": 15.81,
    "close2": 16.9
  }, {
    "name": "Expenses A",
    "open": 12.92,
    "close": 15.81,
    "close2": 17.9
  }, {
    "name": "Expenses B",
    "open": 8.64,
    "close": 12.92,
    "close2": 16.1
  }, {
    "name": "Revenue",
    "open": 2,
    "close": 8.64,
    "close2": 13.2
  } ],
  "valueAxes": [ {
    "axisAlpha": 0,
    "gridAlpha": 0.1,
    "position": "left"
  } ],
  "startDuration": 1,
  "graphs": [ {
    "fillAlphas": 0.8,
    "openField": "open",
    "type": "column",
    "valueField": "close",
    "clustered": false
  }, {
    "fillAlphas": 0.8,
    "openField": "close",
    "type": "column",
    "valueField": "close2",
    "clustered": false
  } ],
  "columnWidth": 0.6,
  "categoryField": "name",
  "categoryAxis": {
    "gridPosition": "start",
    "axisAlpha": 0,
    "gridAlpha": 0.1
  }
} );
  //# sourceURL=pen.js
  </script>
2
Contributors
1
Reply
14
Views
4 Months
Discussion Span
Last Post by rproffitt
2

Go to the Codepen for that and see what I changed in the JS area as follows.

var chart = AmCharts.makeChart( "chartdiv", {
  "type": "serial",
  "theme": "light",
   "depth3D": 20,
  "angle": 30,
  "dataProvider": [ {
    "name": "Income A",
    "open": 0,
    "close": 11.13,
    "close2": 14.13,
    "close3": 17.13
  }, {
    "name": "Income B",
    "open": 11.13,
    "close": 15.81,
    "close2": 19
  }, {
    "name": "Total Income",
    "open": 5,
    "close": 15.81,
    "close2": 16.9
  }, {
    "name": "Expenses A",
    "open": 12.92,
    "close": 15.81,
    "close2": 17.9
  }, {
    "name": "Expenses B",
    "open": 8.64,
    "close": 12.92,
    "close2": 16.1
  }, {
    "name": "Revenue",
    "open": 2,
    "close": 8.64,
    "close2": 13.2
  } ],
  "valueAxes": [ {
    "axisAlpha": 0,
    "gridAlpha": 0.1,
    "position": "left"
  } ],
  "startDuration": 1,
  "graphs": [ {
    "fillAlphas": 0.8,
    "openField": "open",
    "type": "column",
    "valueField": "close",
    "clustered": false
  }, {
    "fillAlphas": 0.8,
    "openField": "close",
    "type": "column",
    "valueField": "close2",
    "clustered": false
  }, {
    "fillAlphas": 0.8,
    "openField": "close2",
    "type": "column",
    "valueField": "close3",
    "clustered": false
  } ],
  "columnWidth": 0.6,
  "categoryField": "name",
  "categoryAxis": {
    "gridPosition": "start",
    "axisAlpha": 0,
    "gridAlpha": 0.1
  }
} );
Votes + Comments
Glad the OP thanked you RP :(
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.