3.0.1 • Published 8 years ago

@domoinc/youtube v3.0.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
8 years ago

Youtube

Configuration Options

chartName

Type: string
Default: "Youtube"

Name of chart for Reporting.

defaultYoutubeUrl

Type: string
Default: "https://www.youtube.com/embed/"

Where to point the player if no valid data is given.

height

Type: number
Default: 400
Units: px

Height of the widget

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

updateSizeableConfigs

Type: boolean
Default: true

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

width

Type: number
Default: 400
Units: px

Width of the widget

Data Definition

label

Type: string

Default validate:

function (d) { return this.accessor(d) !== undefined; }

Default accessor:

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

url

Type: string

Default validate:

function (d) { return this.accessor(d) !== undefined; }

Default accessor:

function (line) { return line[1] === undefined ? undefined : String(line[1]); }

Events

Dispatch Events

External Events

Example

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

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

//Setup some fake data
var data = [
  ['BaneCat', 'https://www.youtube.com/embed/5ywjpbThDpE']
];

//Initialze the widget
var chart = d3.select("#vis")
  .chart("Youtube")
  .c({
    width: 500,
    height: 300
  });

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


/*----------------------------------------------------------------------------------
----------------------------------------------------------------------------------*/

//setTimeout(function () {
//    chart.draw([['Batman', 'https://www.youtube.com/embed/HgT1gtdC-PE']])
//}, 2000);
3.0.1

8 years ago

3.0.0

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago