Skip to content

Commit c0372fe

Browse files
committed
final changes submitted
1 parent 3ff06a4 commit c0372fe

File tree

5 files changed

+71
-16
lines changed

5 files changed

+71
-16
lines changed

apps/demo/src/app/app.component.css

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ html, body {
2929
}
3030

3131
footer {
32-
background-color: #f7f7f7;
32+
background-color: #d7d7d7;
3333
padding: 3rem 0;
3434
margin-top: 4rem;
35-
font-size: 85%;
35+
min-height: 500px;
36+
/* font-size: 85%; */
3637
}
3738

3839
footer ul {

apps/demo/src/app/app.component.html

+8-11
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
fill="currentColor" class="octo-body"></path>
99
</svg>
1010
</a>
11-
<nav class="navbar navbar-toggleable-md fixed-top navbar-light">
11+
<nav class="navbar navbar-expand fixed-top navbar-light">
1212
<div class="container">
1313
<a class="navbar-brand" href="#/">ngx-gauge</a>
14-
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
14+
<!-- <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
1515
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
1616
<span class="navbar-toggler-icon"></span>
17-
</button>
17+
</button> -->
1818

1919
<div class="collapse navbar-collapse" id="navbarSupportedContent">
2020
<ul class="navbar-nav mr-auto">
@@ -38,22 +38,19 @@
3838
<app-getting-started id="getting-started" class="jumptarget"></app-getting-started>
3939
<app-documentation id="documentation" class="jumptarget"></app-documentation>
4040
<app-demos id="demos" class="jumptarget"></app-demos>
41-
<app-playground id="documentation" class="jumptarget"></app-playground>
42-
<!--<div ng-view autoscroll></div>-->
43-
<!-- <section id="getting-started" class="jumptarget" ng-include="'templates/getting-started.html'"></section>
44-
<section id="documentation" class="jumptarget" ng-include="'templates/documentation.html'"></section>
45-
<section id="demos" class="jumptarget" ng-include="'templates/demos.html'"></section>
46-
<section id="playground" class="jumptarget" ng-include="'templates/playground.html'"></section> -->
47-
41+
<app-playground id="playground" class="jumptarget"></app-playground>
4842
<footer>
4943
<div class="container footer-box">
5044
<div>
51-
<div>&copy; copyright 2017-2021 Ashish Chopra. <br> Thanks to <b> GitHub &middot; Angular &middot; Highlightjs &middot; Bootstrap 4 &middot; Font Awesome</b> for giving technologies to build this website.
45+
<div>&copy; copyright 2017-2021 Ashish Chopra.
46+
<br> <br><br> Thanks to <b> GitHub &middot; Angular &middot; Highlightjs &middot; Bootstrap 4 &middot; Font Awesome</b> for giving technologies to build this website.
47+
<br> Thanks to <a href="https://github.com/pixelsyndicate" target="_blank">Wil Dobson</a> for contributing the playground section code in this website. It was huge time-saver for me.
5248
</div>
5349
<br>
5450
<div>
5551
Made with hands &amp; <i class="fa fa-heart"></i> by <a href="https://ashishchopra.co">Ashish Chopra</a>.
5652
<br> Checkout my other <a href="https://github.com/ashish-chopra?tab=repositories">projects</a>.
53+
5754
</div>
5855
</div>
5956
<div>

apps/demo/src/app/demos/demos.component.html

+34-3
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,44 @@ <h4>Gauge Themes</h4>
225225
<div class="column-item">
226226
<div class="output-frame">
227227
<ngx-gauge size="150" type="arch" thick="7" value="68.2" cap="round" label="Speed" append="mph"
228-
foreground-color="#2980b9" background-color="#ecf0f1">
228+
foregroundColor="#2980b9" backgroundColor="#ecf0f1">
229229
</ngx-gauge>
230230
<ngx-gauge size="150" type="arch" thick="7" value="68.2" cap="round" label="Speed" append="mph"
231-
foreground-color="#2ecc71" background-color="#ecf0f1">
231+
foregroundColor="#2ecc71" backgroundColor="#ecf0f1">
232232
</ngx-gauge>
233233
<ngx-gauge size="150" type="arch" thick="7" value="68.2" cap="round" label="Speed" append="mph"
234-
foreground-color="#e74c3c" background-color="#ecf0f1">
234+
foregroundColor="#e74c3c" backgroundColor="#ecf0f1">
235+
</ngx-gauge>
236+
</div>
237+
</div>
238+
</div>
239+
<div class="column-box">
240+
241+
<div class="column-item">
242+
<mat-tab-group dynamicHeight="true">
243+
<mat-tab label="Description">
244+
<div class="content">
245+
<h4>Custom Directive for Display</h4>
246+
The gauge has three custom directives which can be used to modify the representation of the content displayed in the gauge
247+
which is beyond configuring just properties. For example, if you want to show an icon with the value to indicate increase or decrease is shown at the right.
248+
<pre [highlight]="customMarkup1"></pre>
249+
</div>
250+
</mat-tab>
251+
<mat-tab label="Markup">
252+
<div class="content">
253+
This is the code for the demo shown on the right:
254+
255+
<pre [highlight]="customMarkup2"></pre>
256+
</div>
257+
</mat-tab>
258+
</mat-tab-group>
259+
</div>
260+
<div class="column-item">
261+
<div class="output-frame">
262+
<ngx-gauge size="180" type="arch" thick="7" value="68.2" cap="round" label="Revenue" append="%">
263+
<ngx-gauge-prepend>
264+
<i class="fa fa-caret-up" style="color: green"></i>
265+
</ngx-gauge-prepend>
235266
</ngx-gauge>
236267
</div>
237268
</div>

apps/demo/src/app/demos/demos.component.ts

+25
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,29 @@ export class DemosComponent {
100100
101101
}
102102
`
103+
const customMarkup1= `
104+
<ngx-gauge [value]="currentValue">
105+
<ngx-gauge-append>
106+
<!-- custom append text or HTML goes here -->
107+
</ngx-gauge-append>
108+
<ngx-gauge-label>
109+
<!-- custom label text or HTML goes here -->
110+
</ngx-gauge-label>
111+
<ngx-gauge-prepend>
112+
<!-- custom prepend text or HTML goes here -->
113+
</ngx-gauge-prepend>
114+
<ngx-gauge-value>
115+
{{ currentValue * Math.PI | number }}
116+
</ngx-gauge-value>
117+
</ngx-gauge>
118+
`;
119+
const customMarkup2 = `<ngx-gauge size="180" type="arch" thick="7"
120+
value="68.2" cap="round"
121+
label="Revenue" append="%">
122+
<ngx-gauge-prepend>
123+
<i class="fa fa-caret-up" style="color: green"></i>
124+
</ngx-gauge-prepend>
125+
</ngx-gauge>`;
103126

104127
@Component({
105128
selector: 'app-demos',
@@ -124,6 +147,8 @@ export class DemosComponent implements OnInit {
124147
themesMarkup1 = themesMarkup1;
125148
dynamicGaugeDemoMarkup1 = dynamicGaugeDemoMarkup1;
126149
dynamicGaugeDemoTS1 = dynamicGaugeDemoTS1;
150+
customMarkup1 = customMarkup1;
151+
customMarkup2 = customMarkup2;
127152

128153
dynamicGaugeDemoValue = 10.2;
129154

apps/demo/src/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<title>ngx-gauge - A customizable Gauge Component for Angular 4 and Beyond.</title>
6+
<!-- <base href="/ngx-gauge/"> -->
67
<base href="/">
78

89
<meta name="viewport" content="width=device-width, initial-scale=1">

0 commit comments

Comments
 (0)