Skip to content

Commit

Permalink
toggle and legend for small size screens
Browse files Browse the repository at this point in the history
  • Loading branch information
utku-ozturk committed Oct 16, 2024
1 parent d63b21c commit d22327e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/encoded/static/components/viz/AreaChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ export class HorizontalD3ScaleLegend extends React.Component {

renderColorItem([term, color], idx, all){
return (
<div className="col-sm-4 col-md-3 col-lg-3 mb-03 text-truncate" key={term} data-tip={term.length > 25 ? term : null}>
<div className="col-sm-12 col-md-6 col-lg-6 col-xl-3 mb-03 text-truncate" key={term} data-tip={term.length > 25 ? term : null}>
<div className="color-patch" style={{ 'backgroundColor': color }} data-term={term} />
{ term }
</div>
Expand Down Expand Up @@ -1306,7 +1306,7 @@ export class AreaChartContainer extends React.Component {
switch(typeKey) {
case 'expanded':
const gridState = layout.responsiveGridState(windowWidth);
if (gridState && gridState !== 'xl') return false;
if (gridState && ['lg', 'xl', 'xxl'].indexOf(gridState) === -1) return false;
return !!value;
default:
return !!value
Expand Down Expand Up @@ -1380,7 +1380,7 @@ export class AreaChartContainer extends React.Component {
);
}
const gridState = layout.responsiveGridState(windowWidth);
if (['xs', 'sm'].indexOf(gridState) === -1) {
if (['xs', 'sm', 'md'].indexOf(gridState) === -1) {
const toggled = AreaChartContainer.isToggled(this.props, 'expanded');
const className = "btn btn-sm mr-05 " + (toggled ? "btn-primary" : "btn-outline-dark");
buttons.push(
Expand Down

0 comments on commit d22327e

Please sign in to comment.