# @domoinc/domo-tooltip

> DomoTooltip - Domo Widget

Latest version **5.2.0** (published 2017-12-21) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @domoinc/domo-tooltip
pnpm add @domoinc/domo-tooltip
yarn add @domoinc/domo-tooltip
bun add @domoinc/domo-tooltip
```

## 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 | 5.2.0 |
| Published | 2017-12-21 |
| First published | 2016-02-02 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Domo Inc. |
| Maintainers | jeff.smith, walex, jpumford, whitney.rosenberg, bmbarker-domo, bkingery, excrispy, clm, scott.davidson.domo, k4paul, andrewjensen, jgalb, dallasnorton, jonathan-law, morganjohn12, nicksrandall, jmstewart |
| Keywords | domo, app |

## Links

- npm: https://www.npmjs.com/package/@domoinc/domo-tooltip
- npm.io page: https://npm.io/package/@domoinc/domo-tooltip

## Dependencies (6)

- [d3](https://npm.io/package/d3.md) ^3.5.14
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [d3.chart](https://npm.io/package/d3.chart.md) ^0.3.0
- [@domoinc/da-theme2](https://npm.io/package/@domoinc/da-theme2.md) ^2.3.0
- [@domoinc/utilities](https://npm.io/package/@domoinc/utilities.md) ^4.2.1
- [@domoinc/base-widget](https://npm.io/package/@domoinc/base-widget.md) ^1.4.1

## Recent versions

- 5.2.0 (latest) — 2017-12-21
- 5.1.13 — 2016-03-09
- 5.1.12 — 2016-03-09
- 5.1.11 — 2016-03-08
- 5.1.10 — 2016-02-10
- 5.1.9 — 2016-02-10
- 5.1.8 — 2016-02-08
- 5.1.7 — 2016-02-03
- 5.1.6 — 2016-02-03
- 5.1.5 — 2016-02-02
- 5.1.4 — 2016-02-02
- 5.1.3 — 2016-02-02

## README

# DomoTooltip
Here goes a brief description of your widget

## Config

``` js
this._config = {
	height: {										// Name of config Item
		name: 'Chart Height',						// [Optional] - This is the human readable name for this config item in Title Case. It should only be set if this is something that an end user would want to configure.
		description: 'Height of the chart.',		// Human readable description.
		type: 'number',								// [Optional] - Value type. Will be used for UI elements in future.
		value: 100									// Default value for item
	},
	width: {
		name: 'Chart Width'
		description: 'Width of the chart.',
		type: 'number',
		value: 100
	},
	shouldValidate: {
		description: 'Flag for turning off data validation.',
		type: 'boolean',
		value: true
	},
	chartName: {
		description: 'Name of chart for Reporting.',
		type: 'string',
		value: 'DomoTooltip'
	}
};
```

## Data Definition
``` js
//----------------------------------------------------------------------------------
// Data Definition:
// Set functions on how to access and validate data values.
//----------------------------------------------------------------------------------
_Chart._newDataDefinition = {
	'Label': {
		type: 'string', 													// Expected type for column...
		validate: function (d) { return this.accessor(d) !== undefined; }, 	// Validation function
		accessor: function (line) { return String(line[0]); }, 				// Accessor function
	},
	'Value': {
		type: 'number',
		validate: function (d) { return !isNaN(this.accessor(d)) && this.accessor(d) >= 0; },
		accessor: function (line) { return Number(line[1]); },
	}
};
```

## Create Widget
``` js
//Setup some fake data
var data = [
	[1,2,3],
	[4,5,6],
	[7,8,9]
];

//Initialze the widget
var chart = d3.select("#vis")
	.append("svg")
	.append("g")
	.attr("transform", "translate(50,50)")
	.chart("DomoTooltip")
	.width(250)
	.height(250);

//Render the chart with data
chart._notifier.showMessage(true);
chart.draw(data);
```

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