Merge pull request #37 from petitPapillon/increase_chart_interval_and_update_theme
Increase chart default time interval; detect theme changes
This commit is contained in:
commit
f022e9115a
|
@ -24,7 +24,8 @@ $(function() {
|
|||
gChart = $('#chartContainer').StockChartX({
|
||||
width: $('#chartContainer').parent().width(),
|
||||
height: 360,
|
||||
theme: chartTheme
|
||||
theme: chartTheme,
|
||||
timeInterval: 1000 * 60
|
||||
//fullWindowMode: isFullWindowMode
|
||||
});
|
||||
|
||||
|
@ -99,7 +100,7 @@ function ChartsInstruments(instrument_data){
|
|||
company: instrument_data.company,
|
||||
exchange: "BarterDEX"
|
||||
};
|
||||
gChart.timeInterval = StockChartX.TimeSpan.MILLISECONDS_IN_DAY;
|
||||
// gChart.timeInterval = StockChartX.TimeSpan.MILLISECONDS_IN_DAY;
|
||||
gChart.removeDrawings();
|
||||
gChart.setNeedsUpdate(!0);
|
||||
gChart.setNeedsAutoScaleAll();
|
||||
|
@ -275,3 +276,12 @@ function Refresh_active_StockChart(sig) {
|
|||
}
|
||||
UpdateDexChart($('.trading_pair_coin2').selectpicker('val'),$('.trading_pair_coin').selectpicker('val'));
|
||||
}
|
||||
|
||||
function RefreshStockChartTheme(selectedTheme) {
|
||||
var chartTheme = StockChartX.Theme.Light;
|
||||
if (selectedTheme === "dark") {
|
||||
chartTheme = StockChartX.Theme.Dark;
|
||||
}
|
||||
gChart.theme = chartTheme;
|
||||
gChart.update();
|
||||
}
|
|
@ -387,6 +387,7 @@ $('.dexsettings-btn').click(function(e){
|
|||
console.log(barterDEX_settings);
|
||||
ShepherdIPC({"command":"update_settings", "data":barterDEX_settings});
|
||||
BarterDEXSettingsFn();
|
||||
RefreshStockChartTheme(selected_theme);
|
||||
if (barterDEX_settings.deflang == 'tlh_UNI') {
|
||||
$('body').css('font-family','piqad');
|
||||
BarterDEXDefaultLangFn(selected_deflang);
|
||||
|
|
|
@ -266,7 +266,7 @@ $('.porfolio_coins_list tbody').on('click', '.btn-portfoliogo', function() {
|
|||
|
||||
//getZeroConfDepositHistory();
|
||||
|
||||
sessionStorage.setItem('mm_chartinterval', JSON.stringify({"periodicity":"","interval":1}));
|
||||
sessionStorage.setItem('mm_chartinterval', JSON.stringify({"periodicity":"h","interval":1}));
|
||||
|
||||
var charts_instruments_data = {}
|
||||
if ($(this).data('coin') == 'KMD') {
|
||||
|
|
Loading…
Reference in New Issue