Element: <oj-c-legend-item>

CORE PACK

Oracle® JavaScript Extension Toolkit (JET)
15.1.0

F83698-01

Since:
  • 15.0.0
Module:
  • legend-item

QuickNav

Attributes

Other Topics


JET Legend Item

The oj-c-legend-item element is used to declare properties for legend items and is only valid as the child of a template element for the itemTemplate slot of oj-c-legend.

 
 <oj-c-legend data='[[dataProvider]]'>
  <template slot='itemTemplate'>
    <oj-c-legend-item  text='[[$current.data.text]]' color='[[$current.data.color]]'>
    </oj-c-legend-item>
  </template>
 </oj-c-legend>
 
 

Accessibility

Read the Accessibility Section of the oj-c-legend component for details about making this component accessible.


Usage

Signature:

interface CLegendItemElement

Typescript Import Format
//To typecheck the element APIs, import as below.
import { CLegendItemElement } from "oj-c/legend-item";

//For the transpiled javascript to load the element's module, import as below
import "oj-c/legend-item";

For additional information visit:


Attributes

border-color :string

The border color of the marker. Only applies if symbolType is "marker" or "lineWithMarker

categories :Array<string>

An array of categories for the legend item. Legend items currently only support a single category.

color :string

The color of the legend symbol (line or marker). When symbolType is "lineWithMarker", this attribute defines the line color and the markerColor attribute defines the marker color.

line-style :"dotted"|"dashed"|"solid"

The line style. Only applies when the symbolType is "line" or "lineWithMarker".
Supported Values:
Value Description
dashed Line will have dashed strokes.
dotted Line will have dotted strokes.
solid Line will have a solid stroke.

line-width :number

The line width in pixels. Only applies when the symbolType is "line" or "lineWithMarker.

marker-color :string

The color of the marker, if different than the line color. Only applies if the symbolType is "lineWithMarker".

marker-shape :"circle"|"diamond"|"ellipse"|"human"|"plus"|"rectangle"|"square"|"star"|"triangleDown"|"triangleUp"

The shape of the marker. Only applies if symbolType is "marker" or "lineWithMarker". Does not apply if a custom image is specified.
Supported Values:
Value Description
circle The marker will be of circular shape.
diamond The marker will be of diamond shape.
ellipse The marker will be of ellipse shape.
human The marker will be of human shape.
plus The marker will be of plus shape.
rectangle The marker will be of rectangular shape.
square The marker will be of square shape.
star The marker will be of star shape.
triangleDown The marker will be of triangular shape facing down.
triangleUp The marker will be of triangular shape facing up.

short-desc :string

The description of this legend item. This is used for accessibility and for customizing the tooltip text.

source :string

The URI of the image of the legend symbol.

symbol-type :"line"|"lineWithMarker"|"image"|"marker"

The type of legend symbol to display.
Supported Values:
Value Description
image The legend symbol will be an image.
line The legend symbol will be a line.
lineWithMarker The legend symbol will be a line and a marker.
marker The legend symbol will be a marker.

text :string

The legend item text.