JavaScript
var chart;
var graph;
var graphType = "candlestick";
var maxCandlesticks = 100;
var data = {
nomValue: 0.05,
lowerThreshold: -0.10,
upperThreshold: 0.10,
tags: [
{
date: new Date(2018, 10, 20),
high: 0.05,
low: 0.03,
min: 0.01
}, {
date: new Date(2018, 10, 23),
high: 0.06,
low: 0.03,
min: 0.01
}, {
date: new Date(2018, 10, 25),
high: 0.06,
low: 0.05,
min: 0.01
}
]
}
AmCharts.ready(function() {
AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"titles": [{
"text": "amCharts Box Plot Example",
"size": 15
}],
"graphs": [{
"type": "candlestick",
"balloonText": "High: [[high]]\n Open: [[open]]\n Mid: [[mid]]\n Close: [[close]]\nLow: [[low]]",
"highField": "high",
"openField": "open",
"closeField": "close",
"valueField": "close",
"lowField": "low",
"fillColors": "#ffffff",
"lineColor": "#e62e00",
"lineAlpha": 1,
"fillAlphas": 0.9,
"columnWidth": 0.4
}, {
"type": "column",
"columnWidth": 0.2,
"valueField": "high",
"openField": "high",
"lineColor": "#e62e00",
"lineThickness": 3,
"showBalloon": false,
"clustered": false
}, {
"type": "column",
"columnWidth": 0.2,
"valueField": "low",
"openField": "low",
"lineColor": "#e62e00",
"lineThickness": 3,
"showBalloon": false,
"clustered": false
}, {
"type": "column",
"columnWidth": 0.4,
"valueField": "mid",
"openField": "mid",
"lineColor": "#e62e00",
"lineThickness": 3,
"showBalloon": false,
"clustered": false
}],
"chartCursor": {
"valueLineEnabled": true,
"valueLineBalloonEnabled": true
},
"categoryField": "exp",
"categoryAxis": {
"title": "Experiment No.",
"gridPosition": "start",
"tickPosition": "start",
"tickLength": 10,
"axisAlpha": 0.7,
"gridAlpha": 0
},
"valueAxes": [{
"position": "left",
...