Skip to content

Commit 09a02cc

Browse files
committed
fix: Dashboard charts swap
1 parent 9fda463 commit 09a02cc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/views/Dashboard/Dashboard.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@ const sparklineChartOpts = {
337337
function convertHex(hex, opacity) {
338338
hex = hex.replace('#', '');
339339
const r = parseInt(hex.substring(0, 2), 16);
340-
const g = parseInt(hex.substring(2, 4), 16);
341-
const b = parseInt(hex.substring(4, 6), 16);
340+
var g = parseInt(hex.substring(2, 4), 16);
341+
var b = parseInt(hex.substring(4, 6), 16);
342342

343-
const result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
343+
var result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
344344
return result;
345345
}
346346

@@ -349,12 +349,12 @@ function random(min, max) {
349349
return Math.floor(Math.random() * (max - min + 1) + min);
350350
}
351351

352-
const elements = 27;
352+
var elements = 27;
353353
var data1 = [];
354354
var data2 = [];
355355
var data3 = [];
356356

357-
for (let i = 0; i <= elements; i++) {
357+
for (var i = 0; i <= elements; i++) {
358358
data1.push(random(50, 200));
359359
data2.push(random(80, 100));
360360
data3.push(65);
@@ -454,7 +454,7 @@ class Dashboard extends Component {
454454
<div className="animated fadeIn">
455455
<Row>
456456
<Col xs="12" sm="6" lg="3">
457-
<Card className="text-white bg-primary">
457+
<Card className="text-white bg-info">
458458
<CardBody className="pb-0">
459459
<ButtonGroup className="float-right">
460460
<ButtonDropdown id='card1' isOpen={this.state.card1} toggle={() => { this.setState({ card1: !this.state.card1 }); }}>
@@ -473,13 +473,13 @@ class Dashboard extends Component {
473473
<p>Members online</p>
474474
</CardBody>
475475
<div className="chart-wrapper px-3" style={{ height: '70px' }}>
476-
<Line data={cardChartData1} options={cardChartOpts1} height={70} />
476+
<Line data={cardChartData2} options={cardChartOpts2} height={70} />
477477
</div>
478478
</Card>
479479
</Col>
480480

481481
<Col xs="12" sm="6" lg="3">
482-
<Card className="text-white bg-info">
482+
<Card className="text-white bg-primary">
483483
<CardBody className="pb-0">
484484
<ButtonGroup className="float-right">
485485
<Dropdown id='card2' isOpen={this.state.card2} toggle={() => { this.setState({ card2: !this.state.card2 }); }}>
@@ -497,7 +497,7 @@ class Dashboard extends Component {
497497
<p>Members online</p>
498498
</CardBody>
499499
<div className="chart-wrapper px-3" style={{ height: '70px' }}>
500-
<Line data={cardChartData2} options={cardChartOpts2} height={70} />
500+
<Line data={cardChartData1} options={cardChartOpts1} height={70} />
501501
</div>
502502
</Card>
503503
</Col>

0 commit comments

Comments
 (0)