- Range
- Logarithmic base
- Logarithmic interval
Contact Support
Logarithmic axis in ASP.NET CORE 3D Chart Component
9 Jan 202412 minutes to read
Logarithmic axis uses logarithmic scale and it is very useful in visualizing data, when it has numerical values in both lower order of magnitude (eg: 10-6) and higher order of magnitude (eg: 106).
<ejs-chart3d id="container" wallColor="transparent" enableRotation="true" rotation="7" tilt="10" depth="100">
<e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.DateTime"></e-chart3d-primaryxaxis>
<e-chart3d-primaryyaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Logarithmic"></e-chart3d-primaryyaxis>
<e-chart3d-series-collection>
<e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y"
type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
public ActionResult Index()
{
List<ChartData> chartData = new List<ChartData>
{
new ChartData { x= new DateTime(1995, 01, 01), y= 80 },
new ChartData { x= new DateTime(1996, 01, 01), y= 200 },
new ChartData { x= new DateTime(1997, 01, 01), y= 400 },
new ChartData { x= new DateTime(1998, 01, 01), y= 600 },
new ChartData { x= new DateTime(1999, 01, 01), y= 700 },
new ChartData { x= new DateTime(2000, 01, 01), y= 1400 },
new ChartData { x= new DateTime(2001, 01, 01), y= 2000 },
new ChartData { x= new DateTime(2002, 01, 01), y= 4000 },
new ChartData { x= new DateTime(2003, 01, 01), y= 6000 },
new ChartData { x= new DateTime(2004, 01, 01), y= 8000 },
new ChartData { x= new DateTime(2005, 01, 01), y= 11000 }
};
ViewBag.dataSource = chartData;
return View();
}
public class ChartData
{
public DateTime x;
public double y;
}
Range
The range of an axis will be calculated automatically based on the provided data and it can also be customized by using the Minimum
, Maximum
and Interval
properties of the axis.
<ejs-chart3d id="container" wallColor="transparent" enableRotation="true" rotation="7" tilt="10" depth="100">
<e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.DateTime"></e-chart3d-primaryxaxis>
<e-chart3d-primaryyaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Logarithmic" minimum="100" maximum="10000"
interval="1000"></e-chart3d-primaryyaxis>
<e-chart3d-series-collection>
<e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y"
type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
public ActionResult Index()
{
List<ChartData> chartData = new List<ChartData>
{
new ChartData { x= new DateTime(1995, 01, 01), y= 80 },
new ChartData { x= new DateTime(1996, 01, 01), y= 200 },
new ChartData { x= new DateTime(1997, 01, 01), y= 400 },
new ChartData { x= new DateTime(1998, 01, 01), y= 600 },
new ChartData { x= new DateTime(1999, 01, 01), y= 700 },
new ChartData { x= new DateTime(2000, 01, 01), y= 1400 },
new ChartData { x= new DateTime(2001, 01, 01), y= 2000 },
new ChartData { x= new DateTime(2002, 01, 01), y= 4000 },
new ChartData { x= new DateTime(2003, 01, 01), y= 6000 },
new ChartData { x= new DateTime(2004, 01, 01), y= 8000 },
new ChartData { x= new DateTime(2005, 01, 01), y= 11000 }
};
ViewBag.dataSource = chartData;
return View();
}
public class ChartData
{
public DateTime x;
public double y;
}
Logarithmic base
Logarithmic base can be customized by using the LogBase
property of the axis. For example when the LogBase
is 5, the axis values follows 5-2, 5-1, 50, 51, 52 etc.
<ejs-chart3d id="container" wallColor="transparent" enableRotation="true" rotation="7" tilt="10" depth="100">
<e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.DateTime"></e-chart3d-primaryxaxis>
<e-chart3d-primaryyaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Logarithmic"
logBase="2"></e-chart3d-primaryyaxis>
<e-chart3d-series-collection>
<e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y" columnSpacing="0.1"
type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
public ActionResult Index()
{
List<ChartData> chartData = new List<ChartData>
{
new ChartData { x= new DateTime(1995, 01, 01), y= 80 },
new ChartData { x= new DateTime(1996, 01, 01), y= 200 },
new ChartData { x= new DateTime(1997, 01, 01), y= 400 },
new ChartData { x= new DateTime(1998, 01, 01), y= 600 },
new ChartData { x= new DateTime(1999, 01, 01), y= 700 },
new ChartData { x= new DateTime(2000, 01, 01), y= 1400 },
new ChartData { x= new DateTime(2001, 01, 01), y= 2000 },
new ChartData { x= new DateTime(2002, 01, 01), y= 4000 },
new ChartData { x= new DateTime(2003, 01, 01), y= 6000 },
new ChartData { x= new DateTime(2004, 01, 01), y= 8000 },
new ChartData { x= new DateTime(2005, 01, 01), y= 11000 }
};
ViewBag.dataSource = chartData;
return View();
}
public class ChartData
{
public DateTime x;
public double y;
}
Logarithmic interval
The interval of the logarithmic axis can be customized by using the Interval
property in the axis. When the logarithmic base is 10 and logarithmic Interval is 2, then the axis labels are placed at an interval of 102. The default value of the Interval
is 1.
<ejs-chart3d id="container" wallColor="transparent" enableRotation="true" rotation="7" tilt="10" depth="100">
<e-chart3d-primaryxaxis valueType="@Syncfusion.EJ2.Charts.ValueType.DateTime"></e-chart3d-primaryxaxis>
<e-chart3d-primaryyaxis valueType="@Syncfusion.EJ2.Charts.ValueType.Logarithmic"
interval="2"></e-chart3d-primaryyaxis>
<e-chart3d-series-collection>
<e-chart3d-series dataSource="ViewBag.dataSource" xName="x" yName="y"
type="@Syncfusion.EJ2.Charts.Chart3DSeriesType.Column"></e-chart3d-series>
</e-chart3d-series-collection>
</ejs-chart3d>
public ActionResult Index()
{
List<ChartData> chartData = new List<ChartData>
{
new ChartData { x= new DateTime(1995, 01, 01), y= 80 },
new ChartData { x= new DateTime(1996, 01, 01), y= 200 },
new ChartData { x= new DateTime(1997, 01, 01), y= 400 },
new ChartData { x= new DateTime(1998, 01, 01), y= 600 },
new ChartData { x= new DateTime(1999, 01, 01), y= 700 },
new ChartData { x= new DateTime(2000, 01, 01), y= 1400 },
new ChartData { x= new DateTime(2001, 01, 01), y= 2000 },
new ChartData { x= new DateTime(2002, 01, 01), y= 4000 },
new ChartData { x= new DateTime(2003, 01, 01), y= 6000 },
new ChartData { x= new DateTime(2004, 01, 01), y= 8000 },
new ChartData { x= new DateTime(2005, 01, 01), y= 11000 }
};
ViewBag.dataSource = chartData;
return View();
}
public class ChartData
{
public DateTime x;
public double y;
}