ES v19.2.0.55
I'm seeking to have a user controlled interval for a given dataset that will not result in a second round trip to the server to filter.
Some documentation suggests that the following will work, however the result is null:
var chart = document.getElementById("#container").ej2_instances[0];
In the following, ejChart is not defined:
var chart = $("#container").ejChart("instance");
By what means are there to change the IntervalType property, and the LabelFormat property as necessary when using a chart created using the @Html.EJS().Chart( "container)... method, and then refresh the chart view?
Our current default view is:
.IntervalType( IntervalType.Years )
.LabelFormat( "y" )
Example onclick function call from a styled HREF element:
function setChartIntervalMonths() {
var chart = document.getElementById("#container").ej2_instances[0];
chart.primaryXAxis.intervalType = 'Months';
chart.forceRedraw();
}