-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(demo): add new Example 33 to demo Realtime Trading
- also make this new example the new default route
- Loading branch information
1 parent
b13411c
commit 75987b4
Showing
10 changed files
with
532 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<div class="container-fluid"> | ||
<h2> | ||
{{title}} | ||
<span class="float-end"> | ||
<a style="font-size: 18px" | ||
target="_blank" | ||
href="https://github.com/ghiscoding/Angular-Slickgrid/blob/master/src/app/examples/grid-trading.component.ts"> | ||
<span class="fa fa-link"></span> code | ||
</a> | ||
</span> | ||
</h2> | ||
<div class="subtitle" [innerHTML]="subTitle"></div> | ||
|
||
<div class="trading-platform"> | ||
<div class="row mb-4 simulation-form"> | ||
<div class="col-sm-12 d-flex align-items-center"> | ||
<div class="range"> | ||
<label for="refreshRateRange" class="form-label me-1">Changes Rate(ms)</label> | ||
<input type="range" class="form-range" id="refreshRateRange" min="0" max="250" [(ngModel)]="refreshRate"> | ||
<span class="refresh-rate"> | ||
<input type="number" [(ngModel)]="refreshRate"> | ||
</span> | ||
</div> | ||
<span class="ms-3 me-1"> | ||
<button class="btn btn-outline-secondary btn-sm" data-test="start-btn" (click)="startSimulation()"> | ||
<li class="fa fa-play"></li> Start Simulation | ||
</button> | ||
</span> | ||
<span class="me-3"> | ||
<button class="btn btn-outline-secondary btn-sm" data-test="stop-btn" (click)="stopSimulation()"> | ||
<li class="fa fa-stop"></li> Stop Simulation | ||
</button> | ||
</span> | ||
<span class="mx-1"> | ||
<label for="change-per-cycle-input">Changes p/Cycle</label> | ||
<input type="number" id="change-per-cycle-input" [(ngModel)]="minChangePerCycle" [max]="maxChangePerCycle"> | ||
to | ||
<input type="number" [(ngModel)]="maxChangePerCycle" [min]="minChangePerCycle"> | ||
</span> | ||
<span class="ms-2"> | ||
<label for="highlight-input">Highlight Duration(ms)</label> | ||
<input type="number" id="highlight-input" data-test="highlight-input" [(ngModel)]="highlightDuration"> | ||
</span> | ||
<div class="ms-auto"> | ||
<button class="btn btn-outline-secondary btn-sm" (click)="toggleFullScreen()"> | ||
<li [class]="isFullScreen ? 'fa fa-compress' : 'fa fa-arrows-alt'"></li> Toggle Full-Screen | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<angular-slickgrid gridId="grid33" | ||
[columnDefinitions]="columnDefinitions" | ||
[gridOptions]="gridOptions" | ||
[dataset]="dataset" | ||
(onAngularGridCreated)="angularGridReady($event.detail)"> | ||
</angular-slickgrid> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// @import '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-salesforce.lite.scss'; | ||
|
||
$sparkline-color: #00b78d; | ||
// $sparkline-color: #573585; | ||
|
||
.trading-platform.full-screen { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
padding: 10px 12px 0 10px; | ||
background-color: white; | ||
z-index: 8000; | ||
position: fixed; | ||
} | ||
.changed-gain { | ||
background-color: #eafae8 !important; | ||
} | ||
.changed-loss { | ||
background-color: #ffeae8 !important; | ||
} | ||
.simulation-form { | ||
input[type=number] { | ||
height: 32px; | ||
width: 50px; | ||
border: 1px solid #c0c0c0; | ||
border-radius: 3px; | ||
} | ||
div.range { | ||
display: contents; | ||
width: 200px; | ||
label.form-label { | ||
margin: 0; | ||
} | ||
input.form-range { | ||
width: 120px; | ||
} | ||
} | ||
.refresh-rate input { | ||
height: 30px; | ||
width: 46px; | ||
} | ||
} | ||
.sparkline { | ||
stroke: $sparkline-color; | ||
// fill: none; | ||
fill: rgba($sparkline-color, 0.03); | ||
} |
Oops, something went wrong.