@patternfly-java/charts 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo.html +11 -4
- package/dist/charts.js +56 -41
- package/dist/charts.js.map +1 -1
- package/dist/demo.html +83 -17
- package/package.json +1 -1
- package/src/charts.js +3 -3
- package/src/components/pfj-chart-bullet.js +93 -5
- package/src/react-wrapper.js +0 -13
package/demo.html
CHANGED
|
@@ -96,14 +96,16 @@
|
|
|
96
96
|
<section class="card">
|
|
97
97
|
<h2 class="pf-v5-c-title pf-m-lg">Bullet</h2>
|
|
98
98
|
<pfj-chart-bullet
|
|
99
|
+
id="bullet-chart-0"
|
|
99
100
|
width="600"
|
|
100
|
-
height="
|
|
101
|
+
height="120"
|
|
101
102
|
aria-title="Bullet Chart"
|
|
102
|
-
primary-segmented-measure-data='[{"name":"Measure","y":100},{"name":"Measure","y":60}]'
|
|
103
|
-
primary-dot-measure-data='[{"name":"Measure","y":75}]'
|
|
104
103
|
comparative-warning-measure-data='[{"name":"Warning","y":88}]'
|
|
105
|
-
|
|
104
|
+
primary-segmented-measure-data='[{"name":"Measure","y":23},{"name":"Measure","y":60}]'
|
|
105
|
+
max-domain='{"y":132}'
|
|
106
106
|
qualitative-range-data='[{"name":"Range","y":50},{"name":"Range","y":75},{"name":"Range","y":100}]'
|
|
107
|
+
padding='{"top": 0, "right": 20, "bottom": 10, "left": 80}'
|
|
108
|
+
title="Threads"
|
|
107
109
|
></pfj-chart-bullet>
|
|
108
110
|
</section>
|
|
109
111
|
|
|
@@ -131,6 +133,11 @@
|
|
|
131
133
|
utc.title = `${current}%`;
|
|
132
134
|
utc.subTitle = `${current} of 100 GBps`;
|
|
133
135
|
}, 1000);
|
|
136
|
+
|
|
137
|
+
await customElements.whenDefined('pfj-chart-bullet');
|
|
138
|
+
const bc = document.getElementById('bullet-chart-0');
|
|
139
|
+
if (bc?.updateComplete) await bc.updateComplete;
|
|
140
|
+
bc.labels = ({datum}) => `${datum.name}: ${datum.y}`;
|
|
134
141
|
})();
|
|
135
142
|
</script>
|
|
136
143
|
</body>
|