Legend in ASP.NET CORE 3D Chart Component

11 Jan 202424 minutes to read

Legend provides information about the series rendered in the 3D chart.

Position and alignment

By using the Position property, the legend can be positioned at left, right, top or bottom of the 3D chart. The legend is positioned at the bottom of the 3D chart, by default.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true"
        position="@Syncfusion.EJ2.Charts.LegendPosition.Top"></e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

The custom position helps you to position the legend anywhere in the 3D chart using X and Y coordinates.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" position="@Syncfusion.EJ2.Charts.LegendPosition.Custom">
        <e-chart3dlegendsettings-location x="200" y="20"></e-chart3dlegendsettings-location>
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Legend reverse

The order of the legend items can be reversed by using the Reverse property. By default, legend for the first series in the collection will be placed first.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" reverse="true"></e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Legend alignment

The legend can be aligned at near, far or center to the 3D chart using the Alignment property.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" position="@Syncfusion.EJ2.Charts.LegendPosition.Top"
        alignment="@Syncfusion.EJ2.Charts.Alignment.Near"></e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Legend customization

To change the legend icon shape, LegendShape property in the Series can be used. By default, the legend icon shape is SeriesType.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.Circle"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.SeriesType"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.Rectangle"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true"></e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Legend size

By default, legend takes 20% - 25% of the 3D chart’s height horizontally, when it is placed on top or bottom position and 20% - 25% of the 3D chart’s width vertically, when it is placed on left or right position. You can change this default legend size by using the Height and Width properties of the LegendSettings.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100" selectionMode="@Syncfusion.EJ2.Charts.Chart3DSelectionMode.Series">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.Circle"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.Circle"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.Circle"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" width="500" height="100">
        <e-chart3dlegendsettings-border width="1" color="pink"></e-chart3dlegendsettings-border>
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Legend item size

The size of the legend items can be customised by using the ShapeHeight and ShapeWidth properties.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.Circle"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.Circle"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"
            legendShape="@Syncfusion.EJ2.Charts.LegendShape.Circle"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" shapeHeight="10" shapeWidth="10">
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Paging for legend

Paging will be enabled by default, when the legend items exceeds the legend bounds. Each legend items can be viewed by navigating between the pages using navigation buttons.

<ejs-chart3d id="container" title="FB Penetration of Internet Audience" wallColor="transparent" enableRotation="true"
    rotation="7" tilt="10" depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries" interval="1"
        labelIntersectAction="@Syncfusion.EJ2.Charts.LabelIntersectAction.Rotate45">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="90" labelFormat="{value}%" title="Penetration (%)">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y" name="December 2007"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y1" name="December 2008"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y2" name="December 2009"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y3" name="December 2010"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" padding="10" shapePadding="10" width="200">
        <e-chart3dlegendsettings-border width="2" color="grey"></e-chart3dlegendsettings-border>
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { x= "WW",     y= 12,   y1= 22,   y2= 38.3, y3= 50   },
        new ChartData { x= "EU",     y= 9.9,  y1= 26,   y2= 45.2, y3= 63.6 },
        new ChartData { x= "APAC",   y= 4.4,  y1= 9.3,  y2= 18.2, y3= 20.9 },
        new ChartData { x= "LATAM",  y= 6.4,  y1= 28,   y2= 46.7, y3= 65.1 },
        new ChartData { x= "MEA",    y= 30,   y1= 45.7, y2= 61.5, y3= 73   },
        new ChartData { x= "NA",     y= 25.3, y1= 35.9, y2= 64,   y3= 81.4 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string x;
    public double y;
    public double y1;
    public double y2;
    public double y3;
}

Legend text wrap

When the legend text exceeds the container, the text can be wrapped by using the TextWrap property. End user can also wrap the legend text based on the MaximumLabelWidth property.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" position="@Syncfusion.EJ2.Charts.LegendPosition.Right"
        textWrap="@Syncfusion.EJ2.Charts.TextWrap.Wrap" maximumLabelWidth="50">
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Series selection through legend

By default, you can collapse the series visibility by clicking the legend. On the other hand, turn off the ToggleVisibility property if you must use a legend click to choose a series.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" toggleVisibility="false">
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Collapsing legend item

By default, series name will be displayed as legend. To skip the legend for a particular series, you can give empty string to the series name.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" toggleVisibility="true">
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Legend title

You can set title for legend using Title property in LegendSettings. The Size, Color, Opacity, FontStyle, FontWeight, FontFamily, TextAlignment, and TextOverflow of legend title can be customized by using the TitleStyle property in LegendSettings. The TitlePosition is used to set the legend position in Top, Left and Right position. The MaximumTitleWidth is used to set the width of the legend title. By default, it will be 100px.

<ejs-chart3d id="container" title="Olympic Medals" wallColor="transparent" enableRotation="true" rotation="7" tilt="10"
    depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="80" interval="20" title="Medals">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="gold" name="Gold"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="silver" name="Silver"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="country" yName="bronze" name="Bronze"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings visible="true" title="Countries">
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { country= "USA",       gold= 50, silver= 70, bronze= 45 },
        new ChartData { country= "China",     gold= 40, silver= 60, bronze= 55 },
        new ChartData { country= "Japan",     gold= 70, silver= 60, bronze= 50 },
        new ChartData { country= "Australia", gold= 60, silver= 56, bronze= 40 },
        new ChartData { country= "France",    gold= 50, silver= 45, bronze= 35 },
        new ChartData { country= "Germany",   gold= 40, silver= 30, bronze= 22 },
        new ChartData { country= "Italy",     gold= 40, silver= 35, bronze= 37 },
        new ChartData { country= "Sweden",    gold= 30, silver= 25, bronze= 27 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string country;
    public double gold;
    public double silver;
    public double bronze;
}

Arrow page navigation

The page number will always be visible while using legend paging. It is now possible to disable the page number and enable page navigation with the left and right arrows. The EnablePages property needs to be set to false in order to render the arrow page navigation.

<ejs-chart3d id="container" title="FB Penetration of Internet Audience" wallColor="transparent" enableRotation="true"
    rotation="7" tilt="10" depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries" interval="1"
        labelIntersectAction="@Syncfusion.EJ2.Charts.LabelIntersectAction.Rotate45">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="90" labelFormat="{value}%" title="Penetration (%)">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y" name="December 2007"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y1" name="December 2008"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y2" name="December 2009"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y3" name="December 2010"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings width="180" enablePages="false">
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { x= "WW",     y= 12,   y1= 22,   y2= 38.3, y3= 50   },
        new ChartData { x= "EU",     y= 9.9,  y1= 26,   y2= 45.2, y3= 63.6 },
        new ChartData { x= "APAC",   y= 4.4,  y1= 9.3,  y2= 18.2, y3= 20.9 },
        new ChartData { x= "LATAM",  y= 6.4,  y1= 28,   y2= 46.7, y3= 65.1 },
        new ChartData { x= "MEA",    y= 30,   y1= 45.7, y2= 61.5, y3= 73   },
        new ChartData { x= "NA",     y= 25.3, y1= 35.9, y2= 64,   y3= 81.4 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string x;
    public double y;
    public double y1;
    public double y2;
    public double y3;
}

Legend item padding

The ItemPadding property can be used to adjust the space between the legend items.

<ejs-chart3d id="container" title="FB Penetration of Internet Audience" wallColor="transparent" enableRotation="true"
    rotation="7" tilt="10" depth="100">
    <e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Category" title="Countries" interval="1"
        labelIntersectAction="@Syncfusion.EJ2.Charts.LabelIntersectAction.Rotate45">
    </e-chart3d-primaryxaxis>
    <e-chart3d-primaryyaxis minimum="0" maximum="90" labelFormat="{value}%" title="Penetration (%)">
    </e-chart3d-primaryyaxis>
    <e-chart3d-series-collection>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y" name="December 2007"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y1" name="December 2008"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y2" name="December 2009"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
        <e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y3" name="December 2010"
            type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
    </e-chart3d-series-collection>
    <e-chart3d-legendsettings itemPadding="30" enablePages="false">
    </e-chart3d-legendsettings>
</ejs-chart3d>
public ActionResult Index()
{
    List<ChartData> chartData = new List<ChartData>
    {
        new ChartData { x= "WW",     y= 12,   y1= 22,   y2= 38.3, y3= 50   },
        new ChartData { x= "EU",     y= 9.9,  y1= 26,   y2= 45.2, y3= 63.6 },
        new ChartData { x= "APAC",   y= 4.4,  y1= 9.3,  y2= 18.2, y3= 20.9 },
        new ChartData { x= "LATAM",  y= 6.4,  y1= 28,   y2= 46.7, y3= 65.1 },
        new ChartData { x= "MEA",    y= 30,   y1= 45.7, y2= 61.5, y3= 73   },
        new ChartData { x= "NA",     y= 25.3, y1= 35.9, y2= 64,   y3= 81.4 }
    };
    ViewBag.dataSource = chartData;
    return View();
}
public class ChartData
{
    public string x;
    public double y;
    public double y1;
    public double y2;
    public double y3;
}