I'm making a candlestick chart in C# for a bitcoin trading helper. When the form loads, the chart is just an empty white space because there are no data points initially. Is there any way to display the grid lines and the axes when there are no data points? Thank you!
EDIT: A data point is added ~1 minute after loading, so aesthetically I think it would look better to have the empty grid lines and axes than to simply hide the chart altogether.
This is all I've added to the load method:
chart1.Titles.Add("Candlestick Chart");
//chart grid lines colors
chart1.ChartAreas[0].AxisX.MajorGrid.Enabled = false;
chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.Gray;
I think you can add empty point for the Chart series data points chart3.Series[0].Points.Add(); chart3.Series[0].Points[0].IsEmpty = true; check this: https://www.syncfusion.com/kb/73/how-do-i-set-emptypoint-for-the-chart-series-data-points
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With