Mschart Gridline removing.

wildfire1982
01-07-2004, 06:56 AM
I have posted this on dotnetforums.net but i cant find an answer so... Has anyone got any idea how to remove the gridlines in an mschart? they look awful and i cant seem to find anything to do with them. If its not possible, i will keep trying to spread the gridlines out but i dont seem to be having any luck with that either. Thing is, i have 100 rows and so as you can probably imagine, lots of rows means lots of lines. Not very pretty lookin. Cheers for any thoughts.

Shurik12
01-07-2004, 07:25 AM
Hi,

Sorry I don't have VB.NET by hand so it can be slightly different. But the way I used to do in VB6, if I remember correctly was:




With MSChart1.Plot.Axis(VtChAxisIdX)

...
.CategoryScale.DivisionPerTick=MSChart1.DataGrid.RowCount/10
.CategoryScale.DivisionPerLabel=MSChart1.DataGrid.RowCount/10
....


End With





Try to play with this and see whther it's what you need.


Regards,
Shurik.

wildfire1982
01-07-2004, 08:50 AM
Thanks very much for that, i tried them all and played with everything then found an auto thing that was defaulted to ON, so i eventually found it. I will finish the portion of code and then add it to this post for anyone else interested (.net). Thanks again.


With showResults.AxMSChart1.Plot.Axis(MSChart20Lib.VtChAxisId.VtChAxisIdX)
.CategoryScale.DivisionsPerTick = 10
.CategoryScale.DivisionsPerLabel = 10
.ValueScale.Maximum = 10
.ValueScale.Minimum = 10
.ValueScale.MinorDivision = 0
.ValueScale.MajorDivision = 0
.AxisScale.type = MSChart20Lib.VtChScaleType.VtChScaleTypeLinear
.Tick.Style = MSChart20Lib.VtChAxisTickStyle.VtChAxisTickStyleNone
.CategoryScale.Auto = False
End With

nb. the showresults is the instance of a form.

Shurik12
01-07-2004, 09:02 AM
>found an auto thing that was defaulted to ON

you mean ?:
.CategoryScaleAuto=True


Would interesting to see the whole thing when you are finished.

wildfire1982
01-07-2004, 09:10 AM
The program is slowly becoming enormous and quite complicated. im sure i can share it once its done. Nearly finished, well... nearly working. Its going to be an on going thing because i can always adjust the algorithms and improve things. Thank you very much for your thoughts. Not many people seem to know much about mschart, so ta muchly.

Shurik12
01-07-2004, 09:16 AM
Oops, I sent my last reply before you added the snippet...
Thanks.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum