Hello, Robert,
The DataBound event should provide you with the desired functionality. For example, if you wanted to set the valueAxis height to always be a quarter of the height of its bars, you could use a function like the one below:
.Events(events => events
.DataBound("calculateColumnsMax")
)
function calculateColumnsMax(e) {
var chart = this;
var volumeValueAxisMax = Math.max(...chart.dataSource.data().map(stock => stock.Volume)) * 4;
chart.options.valueAxis[0].max = volumeValueAxisMax;
chart.redraw();
}
Give this a try and let us know in case of further questions.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Get
quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.
Learn More.