416.467.9100 | Dundas Data Visualization | Login
Welcome Guest
Dashboard v5.0

This site makes extensive use of JavaScript.

Please enable JavaScript in your web browser and reload the page before proceeding.

The Dashboard Canvas

Hide navigation
RSS
Modified on Mon, 03 Mar 2014 06:24 PM Categorized as Design, General Controls, Performance
Click to return to: Documentation | Designing Dashboards


Overview

The Dashboard Canvas is the container for all of your dashboard elements. Use it to adjust the dashboard's background color and set up your dashboard during loading.

Each dashboard has only one Dashboard Canvas, which cannot be deleted or renamed.

The Dashboard Canvas is always named Dashboard.

Dashboard Canvas properties.

Dashboard Canvas properties.


Property attributes

Each property of the control may have attributes as follows:

Property attribute
ImageThis is an Advanced property.
ImageThis is a property that can be saved into a Style Resource.

Also, note that a property appearing without a Property Name is accessible via scripting only.


Properties

The properties of the Dashboard Canvas are described below:

Common

ImageImageProperty Name [Script Name]TypeDescription
Additional Info URL [AdditionalInfoUrl]stringA URL pointing to a web page containing additional information about this dashboard.
Commands [AnalyticalCommands]DdObservableCollection<object>The commands used for analytical dashboard
[DerivedFriendlyName]stringGets the name based on FriendlyName if set, otherwise Name.
Description [Description]stringA description of this dashboard.
ImageDisable Annotations [IsAnnotationsDisabled]boolIndicates whether annotations are disabled for this entire dashboard.
ImageDisable Tracking [IsTrackingDisabled]boolSpecifies that the dashboard will be excluded from usage tracking.
ImageExport Formats [ExportPlugins]DdObservableCollection
<DashboardExportPlugin>
The available export formats and their order.
[FriendlyName]stringThe friendly name of the control which will appear to viewers and should be easily identifiable for them.
Hide DashBlock Frame [HideDashBlockFrame]boolSpecifies whether the frame around this DashBlock should be hidden or not.
Hide From Navigation [Hidden]boolSpecifies that the dashboard should not be displayed in the Viewer's navigation ribbon, the left navigation, nor the HTML Explorer.
Hide From Viewer Ribbon [HideFromRibbon]boolSpecifies that the dashboard should not be displayed in the Viewer's navigation ribbon, but it will be displayed everywhere else.
ImageHit Test Visible [IsHitTestVisible]boolDetermines whether the area contained by this control can return true values for hit testing.
ImageLoading Screen Delay [LoadingScreenDelay]intSpecifies the amount of time (in milliseconds) that has to pass before the loading screen will show.
[Name]stringThe name of the control which can be used to reference it with scripting.
ImageReferences [References]DdObservableCollection<Guid>Script modules referenced by this dashboard
ImageShow Context Menu [IsContextMenuEnabled]boolThis sets whether the context menu is enabled for the entire dashboard. If it's disabled, then the menu will not show up when the user right clicks on any element within the dashboard.
ImageTooltip Duration [ToolTipDuration]intThe time, in seconds, any tooltips should remain visible.

Note: The Tooltip Duration property is available in Dundas Dashboard 5.0.2 or later, and applies to Silverlight viewing only.

Appearance

ImageImageProperty Name [Script Name]TypeDescription
Background [Background]DashboardBrushThe background brush for the canvas.
Re-Size Mode [ResizeMode]DashboardResizeModeThis is the mode which the dashboard will use to re-size itself during a size change by the user.
Template [Template]TemplatePathThe template for the dashboard.
Theme [ThemeResourceKey]ThemeResourceKeyThe theme to use on this dashboard.

Layout

ImageImageProperty Name [Script Name]TypeDescription
[BottomGuidelineName]stringThe name of the bottom guideline.
Height [Height]doubleThe height of the control.
[LeftGuidelineName]stringThe name of the left guideline.
ImageMaximum Height [MaxHeight]doubleSets the maximum height for a control. During re-size, the control will not go more than this value.
ImageMaximum Width [MaxWidth]doubleSets the maximum width for a control. During re-size, the control will not go more than this value.
ImageMinimum Height [MinHeight]doubleSets the minimum height for a control. During re-size, the control will not go less than this value.
ImageMinimum Width [MinWidth]doubleSets the minimum width for a control. During re-size, the control will not go less than this value.
[RightGuidelineName]stringThe name of the right guideline.
[TopGuidelineName]stringThe name of the top guideline.
Width [Width]doubleThe width of the control.

Other

ImageImageProperty Name [Script Name]TypeDescription
Custom Context Menu Commands [CustomContextMenuCommands]InteractionCommandCollectionThe custom commands appended to the context menu for the dashboard and any elements which don't have their own context menu.
ImageDisable Custom Tokens [AreCustomTokensDisabled]boolPrevents the parameter controls on the dashboard from displaying new custom tokens.
ImageDisable Loading Data [IsLoadingDataDisabled]boolPrevents the controls on the dashboard from loading data.
ImageIs Tile Interactive [TileIsInteractive]boolIndicates if the tile is interactive (e.g. allows parameter changes and script interactions).
ImageIs Tile Protected [TileIsProtected]boolIf tile is protected and selected by administrator in HTML Home Screen Settings, it cannot be deleted from HTML Home screen.
[Tag]objectUsed to store an arbitrary object in script.
ImageTile Click Target [TileClickTarget]DashBlockPathThe dashboard or dashblock that the tile will show when clicked.
ImageTile Column Span [TileColumnSpan]intThe number of columns the tile will occupy. Changing this property will automatically re-size the Dashboard to the appropriate tile size.
ImageTile Row Span [TileRowSpan]intThe number of rows the tile will occupy. Changing this property will automatically re-size the Dashboard to the appropriate tile size.

Interactions

ContextClick

The ContextClick interaction lets you respond to context click (right mouse button up) events on the canvas.

Arguments:


Exported

The Exported interaction lets you respond after the dashboard has been exported. For example, you can write a script to restore the original appearance of controls on the dashboard (which you previously changed via the Exporting interaction).

Arguments:

  • DashboardContent sender — source of the event
  • DashboardElementsEventArgs e — Event arguments containing a collection of exported elements. If the collection is empty, this means the entire dashboard was exported.

Example usage:

// Exported(DashboardContent sender, DashboardElementsEventArgs e) // Restore the original appearance of dashboard controls BarChart1.Background = new DashboardSolidColorBrush(Color.FromString("Transparent")); Button1.Visibility = Visibility.Visible;

Exporting

The Exporting interaction lets you respond before the dashboard has been exported. For example, you can write a script that temporarily changes the background color of a control for export purposes, or hides interactive elements such as buttons from the exported image.

Note that it is your responsibility to restore the original appearance of controls via the Exported interaction.

Arguments:

  • DashboardContent sender — source of the event
  • DashboardElementsEventArgs e — Event arguments containing a collection of elements to be exported. If the collection is empty, this means the entire dashboard will be exported.

Example usage:

// Exporting(DashboardContent sender, DashboardElementsEventArgs e) // Temporarily change the appearance of dashboard controls BarChart1.Background = new DashboardSolidColorBrush(Color.FromString("Blue")); Button1.Visibility = Visibility.Collapsed;

Interaction List

The scripted interactions that can be called by other scripts with the services.RunDashboardInteraction() call.


Load

The Load interaction lets you set up your dashboard when it has finished loading. When this script is called, all dashboard elements and controls have been created and initialized, although they haven't been displayed on-screen yet.

Arguments:


Parameter Changed

The Parameter Changed interaction lets you respond to parameter changes. This occurs after a parameter has changed and all updates have occurred to associated objects.

Arguments:


Parameter Changing

The Parameter Changing interaction lets you respond to parameter changing events. This occurs after a parameter has changed but before all updates have occurred to associated objects which allows cancelling the update or changing the values.

Arguments:


The scripting code below shows how to handle the parameter changing event, cancel it, and set new values:

if (e.Parameter.Name == "FilterParameter1") { // Check if the parameter has been updated. if (!services.Globals.ContainsKey("parameter_changing_processed")) { // The parameter has not been updated, updating now, so set the flag. services.Globals["parameter_changing_processed"] = true;

// Cancel the parameter change, because we're setting new values. e.Cancel = true;

// Set the new values. DateTime v1 = e.Parameter.FilterValues[0].MemberValues[0].Values[0]; e.Parameter.FilterValues[0].MemberValues[1].NamedTokenValue = NamedToken.None; e.Parameter.FilterValues[0].MemberValues[1].Values.Clear(); e.Parameter.FilterValues[0].MemberValues[1].Values.Add(v1.AddYears(1));

// Invalidate the parameter so that 2 things happen: // 1. The proper data is retrieved, and // 2. The parameter control gets updated. e.Parameter.InvalidateFilter(); } else { // This is the event triggered by the InvalidateFilter above. // Let it be processed and clear the flag. services.Globals.Remove("parameter_changing_processed"); } }


Printed

The Printed interaction lets you respond after the dashboard has been printed. For example, you can write a script to restore the original appearance of controls on the dashboard (which you previously changed via the Printing interaction).

Arguments:

  • DashboardContent sender — source of the event
  • DashboardElementsEventArgs e — Event arguments containing a collection of printed elements. If the collection is empty, this means the entire dashboard was printed.

Example usage:

// Printed(DashboardContent sender, DashboardElementsEventArgs e) // Restore the original appearance of dashboard controls BarChart1.Background = new DashboardSolidColorBrush(Color.FromString("Transparent")); Button1.Visibility = Visibility.Visible;

Printing

The Printing interaction lets you respond before the dashboard has been printed. For example, you can write a script that temporarily changes the background color of a control for printing purposes, or hides interactive elements such as buttons from the printed dashboard.

Note that it is your responsibility to restore the original appearance of controls via the Printed interaction.

Arguments:

  • DashboardContent sender — source of the event
  • DashboardElementsEventArgs e — Event arguments containing a collection of elements to be printed. If the collection is empty, this means the entire dashboard will be printed.

Example usage:

// Printing(DashboardContent sender, DashboardElementsEventArgs e) // Temporarily change the appearance of dashboard controls BarChart1.Background = new DashboardSolidColorBrush(Color.FromString("Blue")); Button1.Visibility = Visibility.Collapsed;

SizeChanged

The SizeChanged interaction lets you respond when the viewer resizes this dashboard.

Arguments:


You can get the actual (resized) size of the dashboard from the sender argument:

// Use code below in a script for the SizeChanged interaction. string s = "new size: " + sender.ActualWidth + " x " + sender.ActualHeight; ...

Or, use the following code which can also be applied outside of SizeChanged interations:

string s = "new size: " + services.CurrentDashboard.ActualWidth + " x " + services.CurrentDashboard.ActualHeight;

Unload

The Unload interaction lets you respond when the dashboard is unloaded (e.g. user navigates away from the dashboard).

Arguments:


Related topics



Click to return to: Documentation | Designing Dashboards

About Dundas | Contact Us Follow us on Twitter! | Privacy Statement | Report Site Issues

Copyright © 2009-2014 Dundas Data Visualization, Inc.