Merge pull request #42 from petitPapillon/chart-theme-setting

Chart theme setting
This commit is contained in:
Satinder Grewal 2017-12-12 09:53:44 +13:00 committed by GitHub
commit 2eafcd37b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -6,7 +6,14 @@ var gChart;
$(function() {
"use strict";
var isDebugMode = window.location.port === '63342';
var barterDEX_settings = ShepherdIPC({"command":"read_settings"});
var chartTheme = StockChartX.Theme.Light;
if (barterDEX_settings.theme === "dark") {
chartTheme = StockChartX.Theme.Dark;
}
var isDebugMode = window.location.port === '63342';
var isFullWindowMode = isDebugMode || ((StockChartX.Environment.isMobile && $(window).width() < 768) || StockChartX.Environment.isPhone);
/*var symbolsFilePath = StockChartX.Environment.isMobile ? "data/symbols.mobile.json" : "data/symbols.json";
@ -18,6 +25,7 @@ $(function() {
gChart = $('#chartContainer').StockChartX({
width: $('#chartContainer').parent().width(),
height: 360,
theme: chartTheme
//fullWindowMode: isFullWindowMode
});