# @domoinc/single-line-text

> SingleLineText - Domo Widget

Latest version **1.1.0** (published 2016-05-10) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @domoinc/single-line-text
pnpm add @domoinc/single-line-text
yarn add @domoinc/single-line-text
bun add @domoinc/single-line-text
```

## 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 | 1.1.0 |
| Published | 2016-05-10 |
| First published | 2016-02-19 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| 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/single-line-text
- npm.io page: https://npm.io/package/@domoinc/single-line-text

## Dependencies (6)

- [d3](https://npm.io/package/d3.md) ^3.5.16
- [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.1
- [@domoinc/utilities](https://npm.io/package/@domoinc/utilities.md) ^4.2.3
- [@domoinc/base-widget](https://npm.io/package/@domoinc/base-widget.md) ^1.5.2
- [@domoinc/domo-tooltip](https://npm.io/package/@domoinc/domo-tooltip.md) ^5.1.10

## Recent versions

- 1.1.0 (latest) — 2016-05-10
- 1.0.3 — 2016-05-04
- 1.0.2 — 2016-04-13
- 1.0.1 — 2016-03-08
- 1.0.0 — 2016-02-19

## README

# SingleLineText

A single line of text



## Configuration Options


#### alignment
Type: `select`  
Default: `{"name":"Center","value":"middle"}`  

This widget's horizontal alignment is based off of the chart bounds layer. This layer is visible once the widget has been added to an illustrator art board.  The widget can either draw to the left or right of the chartBounds layer, or the text can be centered about the chartBounds layer.

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

Name of chart for Reporting.

#### height
Type: `undefined`  
Default: `undefined`  



#### 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.

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

Flag for turning off data validation

#### textColor
Type: `color`  
Default: `"#333333"`  



#### textFontFamily
Type: `string`  
Default: `"Open Sans"`  



#### textFontWeight
Type: `select`  
Default: `{"name":"300 - Light","value":300}`  

Greater values correspond to increased font boldness (some fonts do not support every value)

#### textSize
Type: `number`  
Default: `36`  
Units: `px`



#### tooltipBackgroundColor
Type: `color`  
Default: `"#555555"`  

Background color for the tooltip

#### tooltipTextColor
Type: `color`  
Default: `"#FFFFFF"`  

Font color for the tooltip text

#### tooltipTextSize
Type: `number`  
Default: `14`  
Units: `px`

undefined

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

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

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

Width of the widget

## Data Definition


#### Label
Type: `string`

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

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

## Events


#### Dispatch Events

#### External Events


## Example

```js  
/*----------------------------------------------------------------------------------
 Create Widget -> index.html

 © 2011 - 2015 DOMO, INC.
 ----------------------------------------------------------------------------------*/

//Setup some fake data
var data = [
  ['Top Sales Reps']
];

//Initialze the widget
var chart = d3.select('#vis')
  .append('svg')
  .attr({
    height: '500px',
    width: '500px'
  })
  .append('g')
  .attr('transform', 'translate(250,230)')
  .chart('SingleLineText')
  .c({
    width: 500,
    height: 500,
  });

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

```

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