class %DeepSee.Component.chartLegend
extends %ZEN.Component.component, %ZEN.Component.dataView
Chart legend component.
This provides an alternate way to display a legend for a Zen chart component.
To use the chart legend you must connect it to a data source using the
controllerId property as well as a chart using the
chartId property. The orientation property
specifies how the legend is layed out.
parameter DEFAULTENCLOSINGCLASS = "dslegendDiv";
Subclasses can set this to change default enclosingClass used for this
component.
parameter DOMAIN = "%DeepSee";
Localization domain
parameter NAMESPACE = "http://www.intersystems.com/deepsee";
This is the XML namespace used for library components.
property chartId
as %ZEN.Datatype.id(COMPONENTTYPE="chart");
id of %DeepSee.SVGComponent.chart component this
legend is associated with.
Note: if this component is placed within a composite element, then the
chart must be within the same composite element.
property legendBorderStyle
as %ZEN.Datatype.style;
Style to apply to border lines in the legend.
property legendBoxStyle
as %ZEN.Datatype.style;
Style to apply to the legendBox
property legendLabels
as %ZEN.Datatype.csv(XMLPROJECTION="none");
Store legend Labels here so available to UI.ChartPDF and Widget.pivot
property legendPosition
as %ZEN.Datatype.string(VALUELIST="top,left,bottom,right,none",XMLPROJECTION="none");
Remember the legend position.
property legendStyle
as %ZEN.Datatype.style;
Style to apply to the legend table.
property legendTitle
as %ZEN.Datatype.caption(XMLPROJECTION="none");
Store legend title here so available to UI.ChartPDF and Widget.pivot
property orientation
as %ZEN.Datatype.string(VALUELIST="horizontal,vertical") [ InitialExpression = "vertical" ];
Specify which way the legend is layed out.
property showLegendTitle
as %ZEN.Datatype.boolean(XMLPROJECTION="none") [ InitialExpression = 1 ];
method %DrawHTML()
Static HTML display method: draw the BODY of this component
as HTML.
Subclasses implement this in order to render the static HTML
contents of a component.
method notifyViewHandler(reason, data1, data2, data3)
[ Language = javascript ]
Notification that the dataController associated with this dataView
has raised an event.
method parseStyleSVG(style)
[ Language = javascript ]
Utility method. Split an SVG css value into individual style values.
Return an object containing these values.
method renderContents()
[ Language = javascript ]
Client-side method to render this control.
method setBorderStyle(borderStyleAttribute, value)
[ Language = javascript ]
Insert a single style item into the multi-item legendBorderStyle
method setOpacity(opacity)
[ Language = javascript ]
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
method transformColor(color)
[ Language = javascript ]
Some charts may have use SVG colors. This is a crude translator.