c# - How to add right border of grid in Chart contol -
here code setting properties of chart attached above:
chart2.chartareas[0].cursorx.isuserenabled = true; chart2.chartareas[0].cursorx.isuserselectionenabled = true; chart2.chartareas[0].axisx.scaleview.zoomable = true; chart2.chartareas[0].axisx.title = "t"; chart2.chartareas[0].axisy.title = "w(t)"; chart2.chartareas[0].axisx.minimum = classes[0].first(); chart2.chartareas[0].axisx.maximum = classes[m - 1].last(); chart2.chartareas[0].axisx.interval = delta_t; chart2.chartareas[0].axisx.labelstyle.format = "{0:0.####}";
i need add right border of grid shown below:
the right border missing since data don't nicely fit area.
there many ways fix this.
here simplest one:
chart2.chartareas[0].axisy2.enabled = axisenabled.true; chart2.chartareas[0].axisy2.labelstyle.enabled = false;
this adds secondary y-axis , turns off labels.
you can style needed:
chart2.chartareas[0].axisy2.majortickmark.enabled = false; chart2.chartareas[0].axisy2.linewidth = 3;
you draw line or add annotation far easiest solution.
Comments
Post a Comment