Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Highstock: Fixed #7773, added new property (compareToMain).
- Loading branch information
1 parent
69a77a8
commit 7f0ce96
Showing
6 changed files
with
115 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
name: Highcharts Stock Demo | ||
authors: | ||
- Rafal Sebestjanski | ||
js_wrap: b | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> | ||
<script src="https://code.highcharts.com/stock/highstock.js"></script> | ||
<script src="https://code.highcharts.com/stock/indicators/indicators-all.js"></script> | ||
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script> | ||
<script src="https://code.highcharts.com/stock/modules/export-data.js"></script> | ||
|
||
<div id="container" style="height: 400px; min-width: 310px"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
$.getJSON('https://www.highcharts.com/samples/data/aapl-c.json', function (data) { | ||
// Create the chart | ||
Highcharts.stockChart('container', { | ||
|
||
plotOptions: { | ||
series: { | ||
compare: 'percent' | ||
} | ||
}, | ||
|
||
rangeSelector: { | ||
selected: 1 | ||
}, | ||
|
||
title: { | ||
text: 'AAPL Stock Price' | ||
}, | ||
|
||
tooltip: { | ||
pointFormat: '{series.name}: {point.y} ({point.change}%)', | ||
valueDecimals: 2 | ||
}, | ||
|
||
series: [{ | ||
name: 'AAPL', | ||
id: 'main', | ||
data: data | ||
}, { | ||
type: 'sma', | ||
name: 'SMA', | ||
linkedTo: 'main', | ||
compareToMain: true | ||
}] | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters