A stop-loss line you can move: drag the box up or down and the value in it follows. Click the X and the line is gone.
A draggable line turns a threshold into something people set themselves: a stop-loss in a trading tool, an alert level on a monitoring screen, a limit in a budget planner. The value in the box updates as it moves, and your code can act on it.
Built with amCharts 5, a JavaScript library. The JavaScript includes your theme and renderer (canvas or SVG); the JSON also follows the changes you make with the controls.
npm install @amcharts/amcharts5. See Getting started.
The same chart as a JSON config. Chart Maker reads and writes this format, the library's JSON parser turns it into a chart, and the <am5-chart> element puts it on a page with no code."type" is the class to create and "settings" what you would pass to its new() in code; "properties" fill in its parts, lists such as series and axes or templates such as columns.template; "refs" holds objects used in more than one place ("#series-0" stands for the one named series-0); a string starting with "@" takes a value from another object, such as "@series.get('fill')".
A complete page. Save it as an .html file and open it in a browser.
Paste this into an AI coding assistant to build the chart from scratch. More in amCharts & AI.
// Create root element
// https://www.amcharts.com/docs/v5/getting-started/#Root_element
var root = am5.Root.new("chartdiv");
// Set themes
// https://www.amcharts.com/docs/v5/concepts/themes/
root.setThemes([
am5themes_Animated.new(root),
am5themes_Responsive.new(root)
]);
// Create chart
// https://www.amcharts.com/docs/v5/charts/xy-chart/
var chart = root.container.children.push(am5xy.XYChart.new(root, {
panX: true, // drag the plot sideways to pan...
panY: true, // ...or up and down
wheelX: "panX", // a horizontal wheel or trackpad swipe pans...
wheelY: "zoomX", // ...and the vertical wheel zooms in on the dates
pinchZoomX: true, // pinch with two fingers to zoom on touch screens
paddingLeft: 0 // the value labels sit at the chart's left edge
}));
// Add cursor
// https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/
var cursor = chart.set("cursor", am5xy.XYCursor.new(root, {}));
cursor.lineX.set("forceHidden", true); // no vertical cursor line...
cursor.lineY.set("forceHidden", true); // ...and no horizontal one: the cursor just shows the tooltip
// Generate random data
var date = new Date();
date.setHours(0, 0, 0, 0);
var value = 20;
// a random walk: each day moves a little from the day before, kept within 0 to 100
function generateData() {
value = am5.math.round(Math.random() * 10 - 4.8 + value, 1);
if (value < 0) {
value = am5.math.round(Math.random() * 10, 1);
}
if (value > 100) {
value = am5.math.round(100 - Math.random() * 10, 1);
}
am5.time.add(date, "day", 1);
return {
date: date.getTime(),
value: value
};
}
// count days of data in a row
function generateDatas(count) {
var data = [];
for (var i = 0; i < count; ++i) {
data.push(generateData());
}
return data;
}
// Create axes
// https://www.amcharts.com/docs/v5/charts/xy-chart/axes/
var xAxis = chart.xAxes.push(am5xy.DateAxis.new(root, {
baseInterval: { // one data point per day
timeUnit: "day",
count: 1
},
renderer: am5xy.AxisRendererX.new(root, {
minorGridEnabled: true, // faint grid lines between the main ones
minGridDistance: 90 // at least 90px between date labels
})
}));
var yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, {
renderer: am5xy.AxisRendererY.new(root, {})
}));
// Add series
// https://www.amcharts.com/docs/v5/charts/xy-chart/series/
var series = chart.series.push(am5xy.LineSeries.new(root, {
name: "Series",
xAxis: xAxis,
yAxis: yAxis,
valueYField: "value",
valueXField: "date",
tooltip: am5.Tooltip.new(root, {
labelText: "{valueY}" // the hovered value
})
}));
series.fills.template.setAll({
fillOpacity: 0.2, // a light fill under the line...
visible: true // ...switched on (line series fills are hidden by default)
});
// Add scrollbar
// https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/
chart.set("scrollbarX", am5.Scrollbar.new(root, {
orientation: "horizontal" // a scrollbar above the plot, to zoom and pan the dates
}));
// DRAGGABLE RANGE
// add series range
var rangeDataItem = yAxis.makeDataItem({});
yAxis.createAxisRange(rangeDataItem);
// create container for all elements, you can put anything you want in it
var container = am5.Container.new(root, {
// the box is centered vertically on the range line
centerY: am5.p50,
draggable: true, // the box can be dragged (up and down only, see the adapters below)
layout: root.horizontalLayout // the label and the X button side by side
})
// restrict from being dragged horizontally: the box stays at the value axis's side of the plot
container.adapters.add("x", function() {
if (yAxis.get("renderer").get("opposite")) {
return chart.plotContainer.width() - container.width(); // the axis on the right: at the right edge
}
return 0; // at the left edge
});
// restrict from being dragged outside of plot
container.adapters.add("y", function(y) {
return Math.max(0, Math.min(chart.plotContainer.height(), y));
});
// change range when y changes
container.events.on("dragged", function() {
updateLabel();
});
// this is needed for the bullets to be interactive, above the plot
yAxis.topGridContainer.children.push(container);
// create bullet and set container as a bullets sprite
rangeDataItem.set("bullet", am5xy.AxisBullet.new(root, {
sprite: container
}));
// decorate grid of a range: a red dashed line, the same red as the box around the label
rangeDataItem.get("grid").setAll({
strokeOpacity: 1,
visible: true,
stroke: am5.color(0xff0000),
strokeDasharray: [2, 2]
})
// create background for the container, in the chart's background color (white, or dark in dark mode)
var background = am5.RoundedRectangle.new(root, {
fill: root.interfaceColors.get("background"),
fillOpacity: 1, // opaque, so the chart doesn't show through the box
strokeOpacity: 0.5, // the outline half transparent
cornerRadiusTL: 0, // square left corners, flush with the axis...
cornerRadiusBL: 0, // ...the right ones stay rounded
cursorOverStyle: "ns-resize", // an up-down arrow pointer over the box
stroke: am5.color(0xff0000) // red, like the range line
})
container.set("background", background);
// with the value axis on the right, the box moves to the right edge and squares its right corners instead
yAxis.get("renderer").on("opposite", function(opposite) {
background.setAll({
cornerRadiusTL: opposite ? 8 : 0, // 8px, the theme's rounding, away from the axis
cornerRadiusBL: opposite ? 8 : 0,
cornerRadiusTR: opposite ? 0 : 8,
cornerRadiusBR: opposite ? 0 : 8
});
container.markDirtyPosition(); // places the box again, through the x adapter above
});
// add label to container, this one will show value and text
var label = container.children.push(am5.Label.new(root, {
paddingTop: 5, // 5px of space above...
paddingBottom: 5 // ...and below the text
}))
// add x button
var xButton = container.children.push(am5.Button.new(root, {
cursorOverStyle: "pointer", // a hand pointer over the button
paddingTop: 5, // the same height as the label...
paddingBottom: 5,
paddingLeft: 2, // ...close to it on the left, with some room on the right
paddingRight: 8
}))
// add label to the button (you can add icon instead of a label)
xButton.set("label", am5.Label.new(root, {
text: "X",
paddingBottom: 0, // no padding around the X
paddingTop: 0,
paddingRight: 0,
paddingLeft: 0,
fill: am5.color(0xff0000) // a red X
}))
// modify background of x button
xButton.get("background").setAll({
strokeOpacity: 0, // no outline...
fillOpacity: 0 // ...and no fill: only the red X shows
})
// dispose item when x button is clicked
xButton.events.on("click", function() {
yAxis.disposeDataItem(rangeDataItem);
})
// reads the value at the box's height (zoom included), shows it and moves the range line there
function updateLabel(value) {
var y = container.y();
var position = yAxis.toAxisPosition(y / chart.plotContainer.height());
if(value == null){
value = yAxis.positionToValue(position);
}
label.set("text", "Stop loss: " + root.numberFormatter.format(value, "#.00")); // always two decimals
rangeDataItem.set("value", value);
}
// when data is validated, set range value to the middle
series.events.on("datavalidated", () => {
var max = yAxis.getPrivate("max", 1);
var min = yAxis.getPrivate("min", 0);
var value = min + (max - min) / 2;
rangeDataItem.set("value", value);
updateLabel(value);
})
// Set data
var data = generateDatas(300);
series.data.setAll(data);
// Make stuff animate on load
// https://www.amcharts.com/docs/v5/concepts/animations/
series.appear(1000);
chart.appear(1000, 100);
{
"type": "XYChart",
"settings": {
"panX": true,
"panY": true,
"wheelX": "panX",
"wheelY": "zoomX",
"pinchZoomX": true,
"paddingLeft": 0,
"cursor": {
"type": "XYCursor",
"properties": {
"lineX": {
"settings": {
"forceHidden": true
}
},
"lineY": {
"settings": {
"forceHidden": true
}
}
}
},
"scrollbarX": {
"type": "Scrollbar",
"settings": {
"orientation": "horizontal"
}
}
},
"properties": {
"series": [
"#series-0"
],
"xAxes": [
"#axis-0"
],
"yAxes": [
"#axis-1"
]
},
"refs": [
{
"data-0": [
{
"date": 1791493200000,
"value": 19.9
},
{
"date": 1791579600000,
"value": 23
},
{
"date": 1791666000000,
"value": 23.7
},
{
"date": 1791752400000,
"value": 20.5
},
{
"date": 1791838800000,
"value": 23.4
},
{
"date": 1791925200000,
"value": 27.5
},
{
"date": 1792011600000,
"value": 23.4
},
{
"date": 1792098000000,
"value": 28.1
},
{
"date": 1792184400000,
"value": 32
},
{
"date": 1792270800000,
"value": 32.5
},
{
"date": 1792357200000,
"value": 31.8
},
{
"date": 1792443600000,
"value": 29
},
{
"date": 1792530000000,
"value": 30.6
},
{
"date": 1792616400000,
"value": 34.3
},
{
"date": 1792702800000,
"value": 35
},
{
"date": 1792789200000,
"value": 35.4
},
{
"date": 1792875600000,
"value": 37.2
},
{
"date": 1792965600000,
"value": 33.7
},
{
"date": 1793052000000,
"value": 38.5
},
{
"date": 1793138400000,
"value": 40.4
},
{
"date": 1793224800000,
"value": 41
},
{
"date": 1793311200000,
"value": 39.2
},
{
"date": 1793397600000,
"value": 43.9
},
{
"date": 1793484000000,
"value": 43.8
},
{
"date": 1793570400000,
"value": 40.9
},
{
"date": 1793656800000,
"value": 39.1
},
{
"date": 1793743200000,
"value": 41.8
},
{
"date": 1793829600000,
"value": 45.8
},
{
"date": 1793916000000,
"value": 47
},
{
"date": 1794002400000,
"value": 44.9
},
{
"date": 1794088800000,
"value": 48.6
},
{
"date": 1794175200000,
"value": 53.1
},
{
"date": 1794261600000,
"value": 51.1
},
{
"date": 1794348000000,
"value": 49.7
},
{
"date": 1794434400000,
"value": 54.4
},
{
"date": 1794520800000,
"value": 57.2
},
{
"date": 1794607200000,
"value": 61.5
},
{
"date": 1794693600000,
"value": 57.9
},
{
"date": 1794780000000,
"value": 53.3
},
{
"date": 1794866400000,
"value": 52.6
},
{
"date": 1794952800000,
"value": 50.9
},
{
"date": 1795039200000,
"value": 49.5
},
{
"date": 1795125600000,
"value": 53.1
},
{
"date": 1795212000000,
"value": 49.2
},
{
"date": 1795298400000,
"value": 53.5
},
{
"date": 1795384800000,
"value": 55.7
},
{
"date": 1795471200000,
"value": 54.2
},
{
"date": 1795557600000,
"value": 52.6
},
{
"date": 1795644000000,
"value": 52.3
},
{
"date": 1795730400000,
"value": 53.4
},
{
"date": 1795816800000,
"value": 52.9
},
{
"date": 1795903200000,
"value": 52.7
},
{
"date": 1795989600000,
"value": 49
},
{
"date": 1796076000000,
"value": 50.3
},
{
"date": 1796162400000,
"value": 52.4
},
{
"date": 1796248800000,
"value": 56.5
},
{
"date": 1796335200000,
"value": 60.3
},
{
"date": 1796421600000,
"value": 60.3
},
{
"date": 1796508000000,
"value": 58.1
},
{
"date": 1796594400000,
"value": 63.1
},
{
"date": 1796680800000,
"value": 65.3
},
{
"date": 1796767200000,
"value": 66.2
},
{
"date": 1796853600000,
"value": 62.8
},
{
"date": 1796940000000,
"value": 66
},
{
"date": 1797026400000,
"value": 63.3
},
{
"date": 1797112800000,
"value": 63.5
},
{
"date": 1797199200000,
"value": 58.8
},
{
"date": 1797285600000,
"value": 63
},
{
"date": 1797372000000,
"value": 67.8
},
{
"date": 1797458400000,
"value": 67.9
},
{
"date": 1797544800000,
"value": 69.4
},
{
"date": 1797631200000,
"value": 70.6
},
{
"date": 1797717600000,
"value": 73.1
},
{
"date": 1797804000000,
"value": 72.3
},
{
"date": 1797890400000,
"value": 71.1
},
{
"date": 1797976800000,
"value": 73.2
},
{
"date": 1798063200000,
"value": 69.8
},
{
"date": 1798149600000,
"value": 69.4
},
{
"date": 1798236000000,
"value": 68.4
},
{
"date": 1798322400000,
"value": 65.6
},
{
"date": 1798408800000,
"value": 67
},
{
"date": 1798495200000,
"value": 70.5
},
{
"date": 1798581600000,
"value": 73.2
},
{
"date": 1798668000000,
"value": 77.6
},
{
"date": 1798754400000,
"value": 79.4
},
{
"date": 1798840800000,
"value": 81.3
},
{
"date": 1798927200000,
"value": 86
},
{
"date": 1799013600000,
"value": 85.6
},
{
"date": 1799100000000,
"value": 83.9
},
{
"date": 1799186400000,
"value": 83.2
},
{
"date": 1799272800000,
"value": 87.5
},
{
"date": 1799359200000,
"value": 89.1
},
{
"date": 1799445600000,
"value": 86.5
},
{
"date": 1799532000000,
"value": 86.2
},
{
"date": 1799618400000,
"value": 89.1
},
{
"date": 1799704800000,
"value": 93.5
},
{
"date": 1799791200000,
"value": 93.3
},
{
"date": 1799877600000,
"value": 95.4
},
{
"date": 1799964000000,
"value": 91.4
},
{
"date": 1800050400000,
"value": 96.3
},
{
"date": 1800136800000,
"value": 95.4
},
{
"date": 1800223200000,
"value": 97.4
},
{
"date": 1800309600000,
"value": 96.3
},
{
"date": 1800396000000,
"value": 90.9
},
{
"date": 1800482400000,
"value": 86.8
},
{
"date": 1800568800000,
"value": 90.9
},
{
"date": 1800655200000,
"value": 92.1
},
{
"date": 1800741600000,
"value": 97.2
},
{
"date": 1800828000000,
"value": 93.8
},
{
"date": 1800914400000,
"value": 95.1
},
{
"date": 1801000800000,
"value": 93.3
},
{
"date": 1801087200000,
"value": 98.5
},
{
"date": 1801173600000,
"value": 99.8
},
{
"date": 1801260000000,
"value": 91.6
},
{
"date": 1801346400000,
"value": 91.1
},
{
"date": 1801432800000,
"value": 95.5
},
{
"date": 1801519200000,
"value": 97.7
},
{
"date": 1801605600000,
"value": 94.7
},
{
"date": 1801692000000,
"value": 98.3
},
{
"date": 1801778400000,
"value": 94.9
},
{
"date": 1801864800000,
"value": 99.2
},
{
"date": 1801951200000,
"value": 98
},
{
"date": 1802037600000,
"value": 93.3
},
{
"date": 1802124000000,
"value": 97.3
},
{
"date": 1802210400000,
"value": 96.2
},
{
"date": 1802296800000,
"value": 95.1
},
{
"date": 1802383200000,
"value": 94.3
},
{
"date": 1802469600000,
"value": 99.1
},
{
"date": 1802556000000,
"value": 97.3
},
{
"date": 1802642400000,
"value": 99.5
},
{
"date": 1802728800000,
"value": 99.9
},
{
"date": 1802815200000,
"value": 97
},
{
"date": 1802901600000,
"value": 96.7
},
{
"date": 1802988000000,
"value": 98
},
{
"date": 1803074400000,
"value": 99.2
},
{
"date": 1803160800000,
"value": 97
},
{
"date": 1803247200000,
"value": 94.1
},
{
"date": 1803333600000,
"value": 96.8
},
{
"date": 1803420000000,
"value": 98.5
},
{
"date": 1803506400000,
"value": 96
},
{
"date": 1803592800000,
"value": 97.3
},
{
"date": 1803679200000,
"value": 94.9
},
{
"date": 1803765600000,
"value": 94
},
{
"date": 1803852000000,
"value": 91.4
},
{
"date": 1803938400000,
"value": 95.9
},
{
"date": 1804024800000,
"value": 97.5
},
{
"date": 1804111200000,
"value": 93
},
{
"date": 1804197600000,
"value": 89.1
},
{
"date": 1804284000000,
"value": 88.2
},
{
"date": 1804370400000,
"value": 92.5
},
{
"date": 1804456800000,
"value": 94
},
{
"date": 1804543200000,
"value": 95.1
},
{
"date": 1804629600000,
"value": 90.6
},
{
"date": 1804716000000,
"value": 87.1
},
{
"date": 1804802400000,
"value": 89.6
},
{
"date": 1804888800000,
"value": 91.4
},
{
"date": 1804975200000,
"value": 93.4
},
{
"date": 1805061600000,
"value": 88.6
},
{
"date": 1805148000000,
"value": 86.9
},
{
"date": 1805234400000,
"value": 89
},
{
"date": 1805320800000,
"value": 85.4
},
{
"date": 1805407200000,
"value": 85.8
},
{
"date": 1805493600000,
"value": 87.2
},
{
"date": 1805580000000,
"value": 88.1
},
{
"date": 1805666400000,
"value": 90.1
},
{
"date": 1805752800000,
"value": 89.1
},
{
"date": 1805839200000,
"value": 88.7
},
{
"date": 1805925600000,
"value": 92.8
},
{
"date": 1806012000000,
"value": 94.8
},
{
"date": 1806098400000,
"value": 93
},
{
"date": 1806184800000,
"value": 91.6
},
{
"date": 1806267600000,
"value": 93.4
},
{
"date": 1806354000000,
"value": 93.9
},
{
"date": 1806440400000,
"value": 93
},
{
"date": 1806526800000,
"value": 97.4
},
{
"date": 1806613200000,
"value": 96.1
},
{
"date": 1806699600000,
"value": 97
},
{
"date": 1806786000000,
"value": 92.5
},
{
"date": 1806872400000,
"value": 92.1
},
{
"date": 1806958800000,
"value": 90.5
},
{
"date": 1807045200000,
"value": 86.3
},
{
"date": 1807131600000,
"value": 83.9
},
{
"date": 1807218000000,
"value": 86.4
},
{
"date": 1807304400000,
"value": 89.9
},
{
"date": 1807390800000,
"value": 91.2
},
{
"date": 1807477200000,
"value": 89.6
},
{
"date": 1807563600000,
"value": 88.6
},
{
"date": 1807650000000,
"value": 91.9
},
{
"date": 1807736400000,
"value": 87.1
},
{
"date": 1807822800000,
"value": 90.5
},
{
"date": 1807909200000,
"value": 85.8
},
{
"date": 1807995600000,
"value": 83.5
},
{
"date": 1808082000000,
"value": 81
},
{
"date": 1808168400000,
"value": 83.8
},
{
"date": 1808254800000,
"value": 79.6
},
{
"date": 1808341200000,
"value": 76.3
},
{
"date": 1808427600000,
"value": 75
},
{
"date": 1808514000000,
"value": 71.6
},
{
"date": 1808600400000,
"value": 73.4
},
{
"date": 1808686800000,
"value": 71
},
{
"date": 1808773200000,
"value": 66.5
},
{
"date": 1808859600000,
"value": 63.5
},
{
"date": 1808946000000,
"value": 68.6
},
{
"date": 1809032400000,
"value": 68.5
},
{
"date": 1809118800000,
"value": 68.6
},
{
"date": 1809205200000,
"value": 69.4
},
{
"date": 1809291600000,
"value": 74.4
},
{
"date": 1809378000000,
"value": 75.3
},
{
"date": 1809464400000,
"value": 71.1
},
{
"date": 1809550800000,
"value": 75.8
},
{
"date": 1809637200000,
"value": 74.3
},
{
"date": 1809723600000,
"value": 72
},
{
"date": 1809810000000,
"value": 67.8
},
{
"date": 1809896400000,
"value": 63.8
},
{
"date": 1809982800000,
"value": 60.5
},
{
"date": 1810069200000,
"value": 58.9
},
{
"date": 1810155600000,
"value": 63.8
},
{
"date": 1810242000000,
"value": 61
},
{
"date": 1810328400000,
"value": 61.8
},
{
"date": 1810414800000,
"value": 62.6
},
{
"date": 1810501200000,
"value": 65.2
},
{
"date": 1810587600000,
"value": 69
},
{
"date": 1810674000000,
"value": 73.9
},
{
"date": 1810760400000,
"value": 78.2
},
{
"date": 1810846800000,
"value": 77.4
},
{
"date": 1810933200000,
"value": 80.8
},
{
"date": 1811019600000,
"value": 84.7
},
{
"date": 1811106000000,
"value": 82.5
},
{
"date": 1811192400000,
"value": 81.5
},
{
"date": 1811278800000,
"value": 80.9
},
{
"date": 1811365200000,
"value": 76.3
},
{
"date": 1811451600000,
"value": 74.4
},
{
"date": 1811538000000,
"value": 77.7
},
{
"date": 1811624400000,
"value": 82.9
},
{
"date": 1811710800000,
"value": 79
},
{
"date": 1811797200000,
"value": 74.2
},
{
"date": 1811883600000,
"value": 76.3
},
{
"date": 1811970000000,
"value": 78.9
},
{
"date": 1812056400000,
"value": 83.1
},
{
"date": 1812142800000,
"value": 82.4
},
{
"date": 1812229200000,
"value": 79.2
},
{
"date": 1812315600000,
"value": 78
},
{
"date": 1812402000000,
"value": 82.6
},
{
"date": 1812488400000,
"value": 80.3
},
{
"date": 1812574800000,
"value": 78.8
},
{
"date": 1812661200000,
"value": 79.9
},
{
"date": 1812747600000,
"value": 78
},
{
"date": 1812834000000,
"value": 81.9
},
{
"date": 1812920400000,
"value": 81
},
{
"date": 1813006800000,
"value": 76.6
},
{
"date": 1813093200000,
"value": 80
},
{
"date": 1813179600000,
"value": 83.6
},
{
"date": 1813266000000,
"value": 87
},
{
"date": 1813352400000,
"value": 92.2
},
{
"date": 1813438800000,
"value": 97
},
{
"date": 1813525200000,
"value": 97.1
},
{
"date": 1813611600000,
"value": 96.2
},
{
"date": 1813698000000,
"value": 95.4
},
{
"date": 1813784400000,
"value": 97.8
},
{
"date": 1813870800000,
"value": 94
},
{
"date": 1813957200000,
"value": 97.1
},
{
"date": 1814043600000,
"value": 94.3
},
{
"date": 1814130000000,
"value": 97.6
},
{
"date": 1814216400000,
"value": 97.9
},
{
"date": 1814302800000,
"value": 93.3
},
{
"date": 1814389200000,
"value": 92.6
},
{
"date": 1814475600000,
"value": 94
},
{
"date": 1814562000000,
"value": 91.8
},
{
"date": 1814648400000,
"value": 96.9
},
{
"date": 1814734800000,
"value": 99
},
{
"date": 1814821200000,
"value": 94.6
},
{
"date": 1814907600000,
"value": 92.2
},
{
"date": 1814994000000,
"value": 89.5
},
{
"date": 1815080400000,
"value": 87.7
},
{
"date": 1815166800000,
"value": 91.2
},
{
"date": 1815253200000,
"value": 86.6
},
{
"date": 1815339600000,
"value": 84.5
},
{
"date": 1815426000000,
"value": 81.6
},
{
"date": 1815512400000,
"value": 77.6
},
{
"date": 1815598800000,
"value": 73.8
},
{
"date": 1815685200000,
"value": 70
},
{
"date": 1815771600000,
"value": 73.4
},
{
"date": 1815858000000,
"value": 73.4
},
{
"date": 1815944400000,
"value": 70.7
},
{
"date": 1816030800000,
"value": 73.7
},
{
"date": 1816117200000,
"value": 75.6
},
{
"date": 1816203600000,
"value": 72.4
},
{
"date": 1816290000000,
"value": 70.9
},
{
"date": 1816376400000,
"value": 70
},
{
"date": 1816462800000,
"value": 74.1
},
{
"date": 1816549200000,
"value": 73.8
},
{
"date": 1816635600000,
"value": 74.5
},
{
"date": 1816722000000,
"value": 76.6
},
{
"date": 1816808400000,
"value": 74.1
},
{
"date": 1816894800000,
"value": 79.3
},
{
"date": 1816981200000,
"value": 81.5
},
{
"date": 1817067600000,
"value": 77.5
},
{
"date": 1817154000000,
"value": 78.8
},
{
"date": 1817240400000,
"value": 83.5
},
{
"date": 1817326800000,
"value": 84.4
}
]
},
{
"axis-0": {
"type": "DateAxis",
"settings": {
"baseInterval": {
"timeUnit": "day",
"count": 1
},
"renderer": {
"type": "AxisRendererX",
"settings": {
"minorGridEnabled": true,
"minGridDistance": 90
}
}
}
}
},
{
"axis-1": {
"type": "ValueAxis",
"settings": {
"renderer": {
"type": "AxisRendererY"
}
}
}
},
{
"series-0": {
"type": "LineSeries",
"settings": {
"name": "Series",
"xAxis": "#axis-0",
"yAxis": "#axis-1",
"valueYField": "value",
"valueXField": "date",
"tooltip": {
"type": "Tooltip",
"settings": {
"labelText": "{valueY}"
}
}
},
"properties": {
"data": "#data-0",
"fills": {
"properties": {
"template": {
"settings": {
"fillOpacity": 0.2,
"visible": true
}
}
}
}
}
}
},
{
"axisRange-0": {
"axis": "#axis-1",
"settings": {
"grid": {
"type": "Grid",
"settings": {
"strokeOpacity": 1,
"stroke": {
"type": "Color",
"value": "#ff0000"
},
"visible": true,
"strokeDasharray": [
2,
2
]
}
},
"bullet": {
"type": "AxisBullet",
"settings": {
"sprite": {
"type": "Container",
"settings": {
"centerY": {
"type": "Percent",
"value": 50
},
"draggable": true,
"layout": {
"type": "HorizontalLayout"
},
"background": {
"type": "RoundedRectangle",
"settings": {
"fill": "@root.interfaceColors.get('background')",
"fillOpacity": 1,
"strokeOpacity": 0.5,
"cornerRadiusTL": 0,
"cornerRadiusBL": 0,
"cursorOverStyle": "ns-resize",
"stroke": {
"type": "Color",
"value": "#ff0000"
}
}
}
}
}
}
},
"value": 55
},
"__parseLogic": "axisRange"
}
}
]
}