Class PaletteItem
Used to define size and preview size of the node to add or remove that symbol from the palette.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.JavaScript.DataVisualization.Models.Diagram
Assembly: Syncfusion.EJ.dll
Syntax
public class PaletteItem : EJTagHelper
Constructors
PaletteItem()
Declaration
public PaletteItem()
Properties
EnableScale
Gets or sets whether the symbol should be drawn at its actual size regardless of precedence factors or not
Declaration
[JsonProperty("enableScale")]
public bool EnableScale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.Palettes = new Collection();
Palette Palette = new Palette("Connectors");
Palette.Expanded = true;
Node Node = new Node();
Node.Name = "Node";
Node.PaletteItem.PreviewWidth = 100;
Node.PaletteItem.PreviewHeight = 100;
Node.PaletteItem.EnableScale = true;
Palette.Items.Add(Node);
Height
Gets or sets the height of the symbol
Declaration
[JsonProperty("height")]
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
Node Node = new Node();
Node.Name = "Node";
Node.PaletteItem.PreviewWidth = 100;
Node.PaletteItem.PreviewHeight = 100;
Node.PaletteItem.Height = 50;
Node.PaletteItem.Width = 50;
Palette.Items.Add(Node);
Label
Gets or sets the text of the symbol
Declaration
[JsonProperty("label")]
public string Label { get; set; }
Property Value
Type | Description |
---|---|
System.String | "" |
Examples
Node Node = new Node();
Node.PaletteItem.Label="data"
Margin
Gets or sets the margin of the symbol item
Declaration
[JsonProperty("margin")]
public Margin Margin { get; set; }
Property Value
Type | Description |
---|---|
Margin | Margin |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.Palettes = new Collection();
Palette Palette = new Palette("Connectors");
Palette.Expanded = true;
Node Node = new Node();
Node.Name = "Node";
Node.PaletteItem.Margin.Left = 50;
Palette.Items.Add(Node);
PreviewHeight
Gets or sets the preview height of the symbol
Declaration
[JsonProperty("previewHeight")]
public double PreviewHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.Palettes = new Collection();
Palette Palette = new Palette("Connectors");
Palette.Expanded = true;
Node Node = new Node();
Node.Name = "Node";
Node.PaletteItem.PreviewWidth = 100;
Node.PaletteItem.PreviewHeight = 100;
Node.PaletteItem.Height = 50;
Node.PaletteItem.Width = 50;
Palette.Items.Add(Node);
PreviewWidth
Gets or sets the preview width of the symbol
Declaration
[JsonProperty("previewWidth")]
public double PreviewWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.Palettes = new Collection();
Palette Palette = new Palette("Connectors");
Palette.Expanded = true;
Node Node = new Node();
Node.Name = "Node";
Node.PaletteItem.PreviewWidth = 100;
Node.PaletteItem.PreviewHeight = 100;
Node.PaletteItem.Height = 50;
Node.PaletteItem.Width = 50;
Palette.Items.Add(Node);
Width
Gets or sets the width of the symbol
Declaration
[JsonProperty("width")]
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | 0 |
Examples
SymbolPaletteProperties SymbolPalette = new SymbolPaletteProperties();
SymbolPalette.Palettes = new Collection();
Palette Palette = new Palette("Connectors");
Palette.Expanded = true;
Node Node = new Node();
Node.Name = "Node";
Node.PaletteItem.PreviewWidth = 100;
Node.PaletteItem.PreviewHeight = 100;
Node.PaletteItem.Height = 50;
Node.PaletteItem.Width = 50;
Palette.Items.Add(Node);
Wrapping
Gets or sets how the palette text needs to be wrapped
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("wrapping")]
public TextWrapping Wrapping { get; set; }
Property Value
Type | Description |
---|---|
TextWrapping | TextWrapping.NoWrap |
Examples
Node Node = new Node() { Name = "node1", Height = 100, HorizontalAlign = HorizontalAlignment.Right };
Node.PaletteItem.Wrapping = TextWrapping.NoWrap;