How to show a message if chart data is empty?
问题 I have WinForm with chart and database.Chart get data from database. If no data the chart isn't visible. I would like to show a message in the chart place.For example: "No data yet." Can I do it? if (chart1["Series1"].Points.Count == 0) { ??? } 回答1: ..show a message in the chart..Can I do it? Sure. There are in fact many ways, from setting the chart's Title to using the Paint event and DrawString or creating a TextAnnotation etc.. The two latter options are easy to center and both will keep