@patternfly-java/charts 0.0.8 → 0.0.9

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 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="150"
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
- comparative-error-measure-data='[{"name":"Error","y":95}]'
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>