416.467.9100 | Dundas Data Visualization | Login
Welcome Guest
This is the support page for the legacy Dundas Dashboard application. For assistance with the current Dundas BI application please click here.
Dashboard v5.0

This site makes extensive use of JavaScript.

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

Color a Clicked Map Shape

Hide navigation
RSS
Modified on Fri, 31 Aug 2012 04:43 PM Categorized as Script Library
&dw; Script LibraryPrevious

Use this script to highlight a clicked Map shape by coloring it black. You can easily customize this script to produce other highlighting effects.

Script

Add this script to the Map's Click interaction.

if (e.VisualElementArgs == null) { return; } if (e.VisualElementArgs is DashboardMapShape) { // Get shape that was clicked DashboardMapShape shape = (DashboardMapShape)e.VisualElementArgs; // Color the shape shape.Fill = new DashboardSolidColorBrush(Colors.Black); } else if (e.VisualElementArgs is DashboardMapSymbol) { // Get the symbol that was clicked DashboardMapSymbol symbol = (DashboardMapSymbol)e.VisualElementArgs; // Color the node symbol.Fill = new DashboardSolidColorBrush(Colors.Black); } else if (e.VisualElementArgs is DashboardMapPath) { // Get the path that was clicked DashboardMapPath path = (DashboardMapPath)e.VisualElementArgs; // Color the node path.Stroke = new DashboardSolidColorBrush(Colors.Black); }

Related topics


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

Copyright © 2009-2014 Dundas Data Visualization, Inc.