@cdc/waffle-chart 4.23.7 → 4.23.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdc/waffle-chart",
3
- "version": "4.23.7",
3
+ "version": "4.23.9",
4
4
  "description": "React component for displaying a single piece of data in a card module",
5
5
  "moduleName": "CdcWaffleChart",
6
6
  "main": "dist/cdcwafflechart",
@@ -26,7 +26,7 @@
26
26
  "license": "Apache-2.0",
27
27
  "homepage": "https://github.com/CDCgov/cdc-open-viz#readme",
28
28
  "dependencies": {
29
- "@cdc/core": "^4.23.7",
29
+ "@cdc/core": "^4.23.9",
30
30
  "@visx/group": "^3.0.0",
31
31
  "@visx/scale": "^3.0.0",
32
32
  "@visx/shape": "^3.0.0",
@@ -273,7 +273,7 @@ const WaffleChart = ({ config, isEditor, link }) => {
273
273
  const gaugeHeight = 35
274
274
 
275
275
  const xScale = scaleLinear({
276
- domain: [0, config.dataDenom],
276
+ domain: [0, waffleDenominator],
277
277
  range: [0, gaugeWidth]
278
278
  })
279
279
  const gaugeColor = themeColor[theme]
@@ -300,7 +300,7 @@ const WaffleChart = ({ config, isEditor, link }) => {
300
300
  <svg height={gaugeHeight} width={'100%'}>
301
301
  <Group>
302
302
  <foreignObject style={{ border: '1px solid black' }} x={0} y={0} width={gaugeWidth} height={gaugeHeight} fill='#fff' />
303
- <Bar x={0} y={0} width={xScale(dataPercentage)} height={gaugeHeight} fill={gaugeColor} />
303
+ <Bar x={0} y={0} width={xScale(waffleNumerator)} height={gaugeHeight} fill={gaugeColor} />
304
304
  </Group>
305
305
  </svg>
306
306
  <div className={'cove-gauge-chart__subtext'}>{parse(subtext)}</div>