0

I've drawn a graph in C# using chart. I know how to set custom intervals but I need to caption only several values on the AxisX not connected with each other (for example, 27, 52.5 and 98). I need only them to be captioned, nothing more (so GCD won't be ok in this case). How can I do it?

Justin McGuire
  • 365
  • 1
  • 5
  • 18
  • instead of the normal label use [custom labels](https://msdn.microsoft.com/de-de/library/system.windows.forms.datavisualization.charting.customlabel%28v=vs.110%29.aspx)! See [here](http://stackoverflow.com/questions/27173680/display-y-values-on-y-axis-without-rounding/27176294?s=2|0.1436#27176294) and [here](http://stackoverflow.com/questions/18911908/custom-label-on-x-axis) for a few hints! The trick is to find suitable values for the fromPosition and toPosition to make the label center nicely between them.. – TaW Nov 28 '15 at 09:43
  • Did you resolve your problem? Btw: What is GCD ? – TaW Dec 23 '15 at 22:07
  • @TaW Sorry for not having answered in time. I didn't, but added progression captions (like 6,12,18...) and, as far as I remember, added them depending on some values so that the captions would be as closer as possible to the needed ones.Thanks for your help anyway! GCD stands for Greatest common divisor (the greatest number that 2 numbers can be divided by: for example, for 12 and 18 it's 6). – Justin McGuire Jan 12 '16 at 23:27
  • If you have problems with custom labels or with the code you have, you may want to update the question.. – TaW Jan 12 '16 at 23:58
  • @TaW now the topic is out-of-date for me - I just helped my groupmate with a course work and don't develop on C# in general. I'm an android developer and now trying to solve one problem - do you program for Android? – Justin McGuire Jan 13 '16 at 00:34
  • nope, I don't. god luck! – TaW Jan 13 '16 at 05:33

0 Answers0