FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
patternfly-java/charts/npm/demo.html at main · patternfly-java/patternfly-java · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
patternfly-java
/
patternfly-java
Public
Notifications
You must be signed in to change notification settings
Fork
5
Star
34
Code
Issues
39
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
patternfly-java
/
charts
/
npm
/
demo.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
144 lines (128 loc) · 4.67 KB
Breadcrumbs
patternfly-java
/
charts
/
npm
/
demo.html
Copy path
File metadata and controls
144 lines (128 loc) · 4.67 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!--
Copyright 2023 Red Hat
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html
>
<
html
lang
="
en
"
>
<
head
>
<
meta
charset
="
utf-8
"
/>
<
meta
name
="
viewport
"
content
="
width=device-width, initial-scale=1
"
/>
<
title
>
PatternFly Charts Web Components Demo
</
title
>
<!-- PatternFly stylesheet -->
<
link
rel
="
stylesheet
"
href
="
https://unpkg.com/@patternfly/patternfly/patternfly.css
"
/>
<
style
>
body
{
padding
:
16
px
;
}
section
{
margin-bottom
:
32
px
;
}
h2
{
margin-top
:
24
px
;
}
.
card
{
border
:
1
px
solid
#
d2d2d2
;
border-radius
:
3
px
;
padding
:
16
px
;
}
</
style
>
</
head
>
<
body
>
<
header
>
<
h1
class
="
pf-v5-c-title pf-m-xl
"
>
PatternFly Charts Web Components
</
h1
>
<
p
>
Demo of
<
code
>
pfj-chart-donut
</
code
>
,
<
code
>
pfj-chart-donut-utilization
</
code
>
,
<
code
>
pfj-chart-donut-threshold
</
code
>
,
and
<
code
>
pfj-chart-bullet
</
code
>
.
</
p
>
</
header
>
<
section
class
="
card
"
>
<
h2
class
="
pf-v5-c-title pf-m-lg
"
>
Donut
</
h2
>
<
pfj-chart-donut
id
="
donut-chart-0
"
width
="
300
"
height
="
300
"
title
="
Pets
"
sub-title
="
Count
"
legend-position
="
bottom
"
>
</
pfj-chart-donut
>
</
section
>
<
section
class
="
card
"
>
<
h2
class
="
pf-v5-c-title pf-m-lg
"
>
Donut Utilization
</
h2
>
<
pfj-chart-donut-utilization
width
="
300
"
height
="
300
"
title
="
60%
"
sub-title
="
Utilization
"
data
='
{"x":"Storage","y":60}
'
>
</
pfj-chart-donut-utilization
>
</
section
>
<
section
class
="
card
"
>
<
h2
class
="
pf-v5-c-title pf-m-lg
"
>
Donut Utilization with Threshold (Nested)
</
h2
>
<
pfj-chart-donut-threshold
aria-desc
="
Storage capacity
"
aria-title
="
Donut utilization chart with static threshold example
"
constrain-to-visible-area
data
='
[{"x":"Warning at 60%","y":60},{"x":"Danger at 90%","y":90}]
'
name
="
chart10
"
width
="
300
"
height
="
300
"
>
<
pfj-chart-donut-utilization
id
="
utilization-threshold-chart-0
"
sub-title
="
of 100 GBps
"
title
="
75%
"
thresholds
='
[{"value": 60}, {"value": 90}]
'
>
</
pfj-chart-donut-utilization
>
</
pfj-chart-donut-threshold
>
</
section
>
<
section
class
="
card
"
>
<
h2
class
="
pf-v5-c-title pf-m-lg
"
>
Bullet
</
h2
>
<
pfj-chart-bullet
id
="
bullet-chart-0
"
width
="
600
"
height
="
120
"
aria-title
="
Bullet Chart
"
comparative-warning-measure-data
='
[{"name":"Warning","y":88}]
'
primary-segmented-measure-data
='
[{"name":"Measure","y":23},{"name":"Measure","y":60}]
'
max-domain
='
{"y":132}
'
qualitative-range-data
='
[{"name":"Range","y":50},{"name":"Range","y":75},{"name":"Range","y":100}]
'
padding
='
{"top": 0, "right": 20, "bottom": 10, "left": 80}
'
title
="
Threads
"
>
</
pfj-chart-bullet
>
</
section
>
<
script
type
="
module
"
>
import
'./src/charts.js'
;
(
async
(
)
=>
{
await
customElements
.
whenDefined
(
'pfj-chart-donut'
)
;
const
dc
=
document
.
getElementById
(
'donut-chart-0'
)
;
if
(
dc
?.
updateComplete
)
await
dc
.
updateComplete
;
dc
.
data
=
[
{
x
:
'Cats'
,
y
:
25
}
,
{
x
:
'Dogs'
,
y
:
55
}
,
{
x
:
'Birds'
,
y
:
20
}
]
;
dc
.
labels
=
(
{
datum
}
)
=>
`
${
datum
.
x
}
:
${
datum
.
y
}
%`
;
const
utc
=
document
.
getElementById
(
'utilization-threshold-chart-0'
)
;
if
(
utc
?.
updateComplete
)
await
utc
.
updateComplete
;
utc
.
data
=
{
x
:
'Storage capacity'
,
y
:
0
}
;
setInterval
(
(
)
=>
{
let
previous
=
utc
.
data
.
y
;
let
current
=
(
previous
+
10
)
%
100
;
utc
.
data
=
{
x
:
'Storage capacity'
,
y
:
current
}
;
utc
.
title
=
`
${
current
}
%`
;
utc
.
subTitle
=
`
${
current
}
of 100 GBps`
;
}
,
1000
)
;
await
customElements
.
whenDefined
(
'pfj-chart-bullet'
)
;
const
bc
=
document
.
getElementById
(
'bullet-chart-0'
)
;
if
(
bc
?.
updateComplete
)
await
bc
.
updateComplete
;
bc
.
labels
=
(
{
datum
}
)
=>
`
${
datum
.
name
}
:
${
datum
.
y
}
`
;
}
)
(
)
;
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL