# @domoinc/growing-shape

> GrowingShape - Domo Widget

Latest version **3.0.1** (published 2016-02-16) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @domoinc/growing-shape
pnpm add @domoinc/growing-shape
yarn add @domoinc/growing-shape
bun add @domoinc/growing-shape
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2016-02-16 |
| First published | 2016-02-16 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Domo Inc. |
| Maintainers | aharris88, andrewjensen, bkingery, bmbarker-domo, clm, dallasnorton, excrispy, freakaziod210, jaxry, jgalb, jmstewart, jonathan-law, k4paul, lcwright21, morganjohn12, nicksrandall, scott.davidson.domo, whitney.rosenberg |
| Keywords | domo, app |

## Links

- npm: https://www.npmjs.com/package/@domoinc/growing-shape
- npm.io page: https://npm.io/package/@domoinc/growing-shape

## Dependencies (3)

- [d3](https://npm.io/package/d3.md) ^3.5.15
- [d3.chart](https://npm.io/package/d3.chart.md) ^0.3.0
- [@domoinc/base-widget](https://npm.io/package/@domoinc/base-widget.md) ^1.5.0

## Recent versions

- 3.0.1 (latest) — 2016-02-16
- 3.0.0 — 2016-02-16

## README

# GrowingShape

A shape that can grow or shrink to a given value with a shadow shape at 100% size



## Configuration Options


#### centerX
Type: `number`  
Default: `0`  
Units: `px`

Set the x value where the shape will grow from (0 corresponds to the center of the shape)

#### centerY
Type: `number`  
Default: `0`  
Units: `px`

Set the y value where the shape will grow from (0 corresponds to the center of the shape)

#### chartName
Type: `string`  
Default: `"GrowingShape"`  

Name of chart for Reporting

#### height
Type: `number`  
Default: `250`  
Units: `px`

Height of the chart

#### isOnMobile
Type: `boolean`  
Default: `false`  

If true, it signals to the widget that it is running on a mobile device. Should be called before draw and then NEVER changed.

#### maxScale
Type: `number`  
Default: `1`  

The shape will never be scaled more than this value

#### maxValue
Type: `number`  
Default: `100`  

Maximum value for the gauge

#### minScale
Type: `number`  
Default: `0`  

The shape will always be scaled by at least this value

#### minValue
Type: `number`  
Default: `0`  

Minimum value for the gauge

#### shape
Type: `d3 selection`  
Default: `""`  

undefined

#### shouldValidate
Type: `boolean`  
Default: `true`  

Flag for turning off data validation

#### showTransparentMaxShape
Type: `select`  
Default: `{"name":"Show","value":true}`  

Show or hide the outline shape

#### updateSizeableConfigs
Type: `boolean`  
Default: `true`  

Flag for turning off the mimic of illustrator's scale functionality

#### width
Type: `number`  
Default: `250`  
Units: `px`

Width of the chart

## Data Definition


#### Label
Type: `string`

Default validate:  
```js
function (d) { return this.accessor(d) !== undefined; }
```

Default accessor:  
```js
function (line) { return line[0] === undefined ? undefined : String(line[0]); }
```

#### Value
Type: `number`

Default validate:  
```js
function (d) { return !isNaN(this.accessor(d)) && this.accessor(d) >= 0; }
```

Default accessor:  
```js
function (line) { return Number(line[1]); }
```

## Events


#### Dispatch Events

#### External Events


## Example

```js  
//Setup some fake data
var data = [['name', 40]];

//Initialize the widget
var svg = d3.select('[id^=DomoWidgetLockDomo]');
var shape = d3.select('[id^=ChangeMe]');

var chart = svg.chart('GrowingShape')
  .c({
    shape: shape
  });

// chart.c('maxScale', 0.6);

//Render the chart with data
chart.draw(data);

var data2 = [['name', 100]];

setTimeout(function() {
  chart.draw(data2);
}, 1500);

setTimeout(function() {
  chart.draw(data);
}, 3000);


```

---
_Source: https://npm.io/package/@domoinc/growing-shape · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
