Chart.Histogram using Plotly.NET.CSharp works very well at producing a histogram that fits exactly around the data provided. However, there are times when being able to specify the min/max limits of the axis would be beneficial to understanding the data in context.
In a case where X is a List<DateTime>, I determined that I can have some effect on the X-axis range by specifying the optional parameter:
XBins: Bins.init(xMin, xMax, binSize)
where the arguments are values of time converted to the unix epoch milliseconds.
However, xMin and xMax appear to have no effect if they would extend the X-axis beyond the limits of the non-zero bins in the dataset. It's as if there's an automatic ranging functionality that overrides manually specified bin start/end settings if they would leave leading or trailing zero bins.
Any suggestions for forcing the X-axis range to follow the start and end values provided in XBins? Or is there another way to accomplish this?
I've included an example histogram which, ideally, would have an X-Axis that starts at 8am and ends 24 hours later.
Chart.Histogram using Plotly.NET.CSharp works very well at producing a histogram that fits exactly around the data provided. However, there are times when being able to specify the min/max limits of the axis would be beneficial to understanding the data in context.
In a case where X is a
List<DateTime>
, I determined that I can have some effect on the X-axis range by specifying the optional parameter:XBins: Bins.init(xMin, xMax, binSize)
where the arguments are values of time converted to the unix epoch milliseconds.However, xMin and xMax appear to have no effect if they would extend the X-axis beyond the limits of the non-zero bins in the dataset. It's as if there's an automatic ranging functionality that overrides manually specified bin start/end settings if they would leave leading or trailing zero bins.
Any suggestions for forcing the X-axis range to follow the start and end values provided in XBins? Or is there another way to accomplish this?
I've included an example histogram which, ideally, would have an X-Axis that starts at 8am and ends 24 hours later.