Jump to content
Software FX Community

Hiding the data area of a chart to show only the y-axis and its labels.

User (Legacy)

Recommended Posts


I have a case where I am attempting to paint a given chart into two

different device contexts effectively.

One will show the data w/o any axis labels. this is trivial to accomplish

via something like:

chart.AxisY.Visible = chart.AxisX.Visible = false;

// ...

chart.Paint(g, r, PaintStyles.None);

the other, where I wish to paint only the y-axis labels (no data or "plot

area" at all!) is proving trickier.. I have numerous "close" aproaches but

nothing satisfactory.

Idealy I could do something like:

chart.AxisY.Paint (...) - but no such method exists; or

chart.PlotAreaVisible = false; ... - likewise doesn't exist; or even ...

chart.PlotAreaWidth = 0; etc...

the closest I've come is:

chart.Data.Series = m_chart.Data.Points = 1;

chart.Data[0, 0] = Chart.Hidden;

chart.Series[0].Visible = false;


this produces the attached image (the part outlined in red is that which I

do not wish to see). Can you suggest any better aproach to this?

One other related question. How do you tell how wide an area the y-axis

labels need in order to render (w/o being clipped out of existence)?

Kind Regards,


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...