c# - How to add right border of grid in Chart contol -


enter image description here

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:

enter image description here

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; 

enter image description here

you draw line or add annotation far easiest solution.


Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -