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.

Customize Legend Item Markers

Hide navigation
RSS
Modified on Wed, 07 May 2014 03:58 PM Categorized as Legend, Script Library, Scripting
&dw; Script LibraryPrevious


Overview

This sample demonstrates how to customize the legend item markers' size and shape. These particular customizations can only be done through scripting.

Default legend item marker size and shape.

Default legend item marker size and shape.




Adding the DundasScript™

You can add this script on the Dashboard Load Interaction. In this sample, Legend1 is the name of the legend control.

DashboardLegend legend = Legend1; //name of the legend control foreach (DashboardLegendItem legendItem in legend.LegendItems) { //to change the marker size legendItem.MarkerWidth = 12; legendItem.MarkerHeight = 12;

//to change the marker shape legendItem.MarkerShape = DashboardMarkerShape.Diamond; }


Note: Here are the different DashboardMarkerShape values you can use:

  • ArrowDown — An arrow shape pointing down.
  • ArrowLeft — An arrow shape pointing left.
  • ArrowRight — An arrow shape pointing right.
  • ArrowUp — An arrow shape pointing up.
  • Check — A check shape.
  • Cross — A cross shape.
  • Diamond — A diamond shape.
  • Ellipse — An elliptical shape.
  • None — No shape.
  • Rectangle — A rectangular shape.
  • Star — A star shape with five points.
  • TriangleDown — A trianglar shape facing down.
  • TriangleUp — A trianglar shape facing up.


Testing

Preview the dashboard:
Legend control showing the new marker size and shape.

Legend control showing the new marker size and shape.

Related topics

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

Copyright © 2009-2014 Dundas Data Visualization, Inc.