Yahoo! UI Library

profilerviewer  2.5.2

Yahoo! UI Library > profilerviewer > YAHOO.widget.ProfilerViewer

Show Private Show Protected

Class YAHOO.widget.ProfilerViewer - extends YAHOO.util.Element

A widget to view YUI Profiler output.

Constructor

YAHOO.widget.ProfilerViewer ( el(optional) , attr )
Parameters:
el(optional) <HTMLElement | String | Object> The html element into which the ProfileViewer should be rendered. An element will be created if none provided.
attr <Object> (optional) A key map of the ProfilerViewer's initial attributes. Ignored if first arg is an attributes object.

Properties

CLASS - static string

Classname for ProfilerViewer containing element.
Default Value: "yui-pv"

CLASS_BUSY - static string

Classname for busy indicator in the dashboard.
Default Value: "yui-pv-busy"

CLASS_CHART - static string

Classname for element containing the chart.
Default Value: "yui-pv-chart"

CLASS_CHART_CONTAINER - static string

Classname for element containing the chart and chart legend elements.
Default Value: "yui-pv-chartcontainer"

CLASS_CHART_LEGEND - static string

Classname for element containing the chart's legend.
Default Value: "yui-pv-chartlegend"

CLASS_DASHBOARD - static string

Classname for ProfilerViewer button dashboard.
Default Value: "yui-pv-dashboard"

CLASS_REFRESH - static string

Classname for the "refresh data" button.
Default Value: "yui-pv-refresh"

CLASS_TABLE - static string

Classname for element containing the datatable.
Default Value: "yui-pv-table"

STRINGS - static object

Strings used in the UI.
Default Value: English language strings for UI.

Properties inherited from YAHOO.util.Element:

Properties inherited from YAHOO.util.AttributeProvider:

Methods

getBodyEl

void getBodyEl ( )
Returns the element containing the console's body, including the chart and the datatable..
Returns: void
HTMLElement

getChart

void getChart ( )
Returns the element containing the console's Chart instance.
Returns: void
YAHOO.widget.BarChart

getChartEl

void getChartEl ( )
Returns the element containing the console's chart.
Returns: void
HTMLElement

getDataTable

void getDataTable ( )
Returns the element containing the console's DataTable instance.
Returns: void
YAHOO.widget.DataTable

getHeadEl

void getHeadEl ( )
Returns the element containing the console's header.
Returns: void
HTMLElement

getTableEl

void getTableEl ( )
Returns the element containing the console's dataTable.
Returns: void
HTMLElement

refreshData

void refreshData ( )
Refreshes the data displayed in the ProfilerViewer. When called, this will invoke a refresh of the DataTable and (if displayed) the Chart.
Returns: void
void

Events

baseChange

baseChange ( eventInfo )
Fires when the value for the configuration attribute 'base' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

beforeBaseChange

beforeBaseChange ( eventInfo )
Fires before the value for the configuration attribute 'base' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeChartSeriesDefinitionsChange

beforeChartSeriesDefinitionsChange ( eventInfo )
Fires before the value for the configuration attribute 'chartSeriesDefinitions' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeChartStyleChange

beforeChartStyleChange ( eventInfo )
Fires before the value for the configuration attribute 'chartStyle' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeFilterChange

beforeFilterChange ( eventInfo )
Fires before the value for the configuration attribute 'filter' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeMaxChartFunctionsChange

beforeMaxChartFunctionsChange ( eventInfo )
Fires before the value for the configuration attribute 'maxChartFunctions' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeShowChartChange

beforeShowChartChange ( eventInfo )
Fires before the value for the configuration attribute 'showChart' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeSortedByChange

beforeSortedByChange ( eventInfo )
Fires before the value for the configuration attribute 'sortedBy' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeSwfUrlChange

beforeSwfUrlChange ( eventInfo )
Fires before the value for the configuration attribute 'swfUrl' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeTableHeightChange

beforeTableHeightChange ( eventInfo )
Fires before the value for the configuration attribute 'tableHeight' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeVisibleChange

beforeVisibleChange ( eventInfo )
Fires before the value for the configuration attribute 'visible' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

chartSeriesDefinitionsChange

chartSeriesDefinitionsChange ( eventInfo )
Fires when the value for the configuration attribute 'chartSeriesDefinitions' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

chartStyleChange

chartStyleChange ( eventInfo )
Fires when the value for the configuration attribute 'chartStyle' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

filterChange

filterChange ( eventInfo )
Fires when the value for the configuration attribute 'filter' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

maxChartFunctionsChange

maxChartFunctionsChange ( eventInfo )
Fires when the value for the configuration attribute 'maxChartFunctions' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

refreshDataEvent

refreshDataEvent ( )
Fired when a data refresh is requested. No arguments are passed with this event.

renderEvent

renderEvent ( )
Fired when the viewer canvas first renders. No arguments are passed with this event.

showChartChange

showChartChange ( eventInfo )
Fires when the value for the configuration attribute 'showChart' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

sortedByChange

sortedByChange ( eventInfo )
Fires when the value for the configuration attribute 'sortedBy' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

swfUrlChange

swfUrlChange ( eventInfo )
Fires when the value for the configuration attribute 'swfUrl' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

tableHeightChange

tableHeightChange ( eventInfo )
Fires when the value for the configuration attribute 'tableHeight' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

visibleChange

visibleChange ( eventInfo )
Fires when the value for the configuration attribute 'visible' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

Configuration Attributes

base - string

The YUI Loader base path from which to pull YUI files needed in the rendering of the ProfilerViewer canvas. Passed directly to YUI Loader. Leave blank to draw files from yui.yahooapis.com.
Default Value: ""

chartSeriesDefinitions - obj

The series definition information to use when charting specific fields on the chart. displayName, xField, and style members are used to construct the series definition; the "group" member is the array of fields that should be charted when the table is sorted by a given field.
Default Value: See JS source for full default definitions.

chartStyle - obj

The style object that defines the chart's visual presentation. Conforms to the style attribute passed to the Charts Control constructor. See Charts Control User's Guide for more information on how to format this object.
Default Value: See JS source for default definitions.

filter - function

A filter function to use in selecting functions that will appear in the ProfilerViewer report. The function is passed a function report object and should return a boolean indicating whether that function should be included in the ProfilerViewer display. The argument is structured as follows: { fn: , calls : , avg : , max: , min: , total: points : } For example, you would use the follwing filter function to return only functions that have been called at least once: function(o) { return (o.calls > 0); }
Default Value: null

maxChartFunctions - int

The maximum number of functions to profile in the chart. The greater the number of functions, the greater the height of the chart canvas. height.
Default Value: 6

showChart - boolean

The default visibility setting for the chart.
Default Value: true

sortedBy - obj

The default column key to sort by. Valid keys are: fn, calls, avg, min, max, total. Valid dir values are: YAHOO.widget.DataTable.CLASS_ASC AND YAHOO.widget.DataTable.CLASS_DESC.
Default Value: {key:"total", dir:"yui-dt-desc"}

swfUrl - object

The path to the YUI Charts swf file; must be a full URI or a path relative to the page being profiled. Changes at runtime not supported; pass this value in at instantiation.
Default Value: "http://yui.yahooapis.com/2.5.0/build/charts/assets/charts.swf"

tableHeight - string

The height of the DataTable. The table will scroll vertically if the content overflows the specified height.
Default Value: "15em"

visible - boolean

The default visibility setting for the viewer canvas. If true, the viewer will load all necessary files and render itself immediately upon instantiation; otherwise, the viewer will load only minimal resources until the user toggles visibility via the UI.
Default Value: false

Configuration attributes inherited from YAHOO.util.Element:


Copyright © 2007 Yahoo! Inc. All rights reserved.