DHTMLX Docs & Samples Explorer

legend

Details:

  • width - a block width
  • align - an horizontal align of the block: “left”, “right” or “center”
  • valign - a vertical align of the block: “top”,“bottom” or “middle”
  • layout - a layout that defines text stretching in horizontal or vertical direction :“x” or “y”
  • marker - an object that defines markers in the details block
    • type - a marker type: “square” or “round”
    • width - a marker width
    • height - a marker height

Legend block can be defined by:

  • a template for element text in legend block.

Value type: String, function

  • an object with settings.

Value type: Object

var chart =  new dhtmlXChart({
	...
	legend:{
			width: 75,
			align:"right",
			valign:top,
			marker:{
				type:"round",
				width:15
			},
			template:"#year#"
		},
    ...
})

or

chart.define("legend",{
			width: 75,
			align:"right",
			valign:top,
			marker:{
				type:"round",
				width:15
			},
			template:"#year#"
});