kirsan31 / winforms-datavisualization

System.Windows.Forms.DataVisualization provides charting for WinForms applications.
MIT License
47 stars 19 forks source link

AxisX.LabelStyle.IsEndLabelVisible - separation between first and last label (improvement suggestion) #52

Open idenchev opened 11 months ago

idenchev commented 11 months ago

Since many years I have been wondering why Microsoft didn't make AxisX.LabelStyle.IsEndLabelVisible option more flexible. There are just 2 options - either True when both first and last labels of X-axis are visible, or False when none of them is visible. There is no option to select either first label only or last label only to be visible. This is not looking good especially when dates are displayed on X-axis. Below is a comparison:

chart.ChartAreas(0).AxisX.LabelStyle.IsEndLabelVisible = True

Here the last label is OK, but the first label on the crossing of X and Y is completely out of place, not to mention that there is no such date in the data series. 2

chart.ChartAreas(0).AxisX.LabelStyle.IsEndLabelVisible = False

In this example the first label is gone, which is the right way, but also the last label is not there leaving quite big gap, which is not nice in terms of design and data readability, because the user cannot see with just one look, which is the last date of statistics available. 1

It would be fantastic if this flexibility of X-axis labeling somehow could be implemented, which will make your project even more fantastic :)