c# - How reduce the height of an mschart by breaking up the y-axis -


how can reduce height of mschart this:

chart flat area

[edit] in case not want break chart view.

this.chart1.chartareas[0].axisy.scalebreakstyle.enabled = false;

you seem looking axisy.scalebreakstyle.

here example:

enter image description here

series s = chart1.series[0]; chartarea ca = chart1.chartareas[0]; axis ay = ca.axisy; s.charttype = seriescharttype.line; (int = 0; < 100; i++) s.points.addxy(i, rnd.next(100) + 50 ); s.points.addxy(s.points.count, 123456);  ay.scalebreakstyle.enabled = true;   // <<<=== enable or disable! ay.scalebreakstyle.linewidth = 1; ay.scalebreakstyle.linecolor = color.orangered; ay.scalebreakstyle.startfromzero = startfromzero.auto; ay.scalebreakstyle.spacing = 2; ay.scalebreakstyle.startfromzero = startfromzero.auto; 

note there quite few cases not work. msdn:

scale breaks not supported under of following conditions:

  • pie, doughnut, funnel, pyramid, radial or stacked chart types used.

  • custom intervals labels, tick marks or grid lines enabled.

  • the minimum or maximum value axis set.

  • custom labels used.

  • a logarithmic y-axis specified.

  • axis views on y-axis, include scrolling , zooming, used.

  • 3-d charts used.

update: of course can disable break @ runtime..


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -