Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Akmal / Add responsiveness to last digit stats title #6636

Merged
merged 2 commits into from
Jul 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/javascript/app/pages/trade/charts/digit_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const DigitInfo = (() => {
plotBackgroundColor: '#fff',
plotBorderWidth : 1,
plotBorderColor : '#ccc',
marginBottom : 50,
height : 225, // This is "unresponsive", but so is leaving it empty where it goes to 400px.
},
title : { text: '' },
Expand Down Expand Up @@ -95,6 +96,18 @@ const DigitInfo = (() => {
},
},
},
responsive: {
rules: [{
condition: {
maxWidth: 472,
},
chartOptions: {
chart: {
marginBottom: 70,
},
},
}],
},
};

const addContent = (underlying) => {
Expand Down Expand Up @@ -166,7 +179,9 @@ const DigitInfo = (() => {

const getTitle = () => (
{
text: template($('#last_digit_title').html(), [new_spots.length, $('#digit_underlying option:selected').text()]),
text : template($('#last_digit_title').html(), [new_spots.length, $('#digit_underlying option:selected').text()]),
useHTML: true,
style : { 'text-align': 'center' },
}
);

Expand Down