I am trying to plot a file's byte count over a C# WinForms bar graph. As such, the X-axis will have values 0-255 (if greater than zero) and the Y-axis varies upon the length of the file and the byte distribution. The code is as follows:
for (int i = 0; i < byteDistribution.Count; i++)
{
if (byteDistribution[i] > 0)
{
Series series = new Series(i.ToString());
series.Points.AddXY(i, byteDistribution[i]);
// PointWidth has no affect?
series.SetCustomProperty("PointWidth", "1");
this.crtBytes.Series.Add(series);
}
Questions:
- This works well but the way the chart is shown is not to my liking. I would like each bar to fill in as much space as possible (ie. no margin / border). From what I've read elsewhere it was suggested to use PointWidth or PixelPointWidth but none of these approaches is working.
- Is there a way to remove the inner black grid lines from showing? Ideally, I would like the bottom X-axis numbering to remain just the same, but remove the grid lines.