@domoinc/youtube
v3.0.1
Published
Youtube - Domo Widget
Downloads
6
Readme
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);