Click here to Skip to main content
15,350,151 members
Home / Discussions / Windows Forms
   

Windows Forms

 
PinnedForum Guidelines - PLEASE READ PinPopular
Chris Maunder28-Jul-09 2:38
cofounderChris Maunder28-Jul-09 2:38 
Questionvb.net chart axis.X only every 5th Label should be shown. Pin
JTrum9-May-22 4:11
MemberJTrum9-May-22 4:11 
The following problem: Chart x-axis represents calendar weeks from 2021/35 to 2022/36 (current week 2022/19). I don't want to represent every week as a label, but only every 5th week. Up to the current week it looks relatively good, but after that every week is displayed as label.
VB.NET
newchart(chart1)'erzeugt ein neues leeres chart
Dim chartArea1 As New ChartArea("Default")
chart1.AntiAliasing = AntiAliasingStyles.None
chart1.TextAntiAliasingQuality = TextAntiAliasingQuality.Normal
chart1.ChartAreas.Add(chartArea1)
chart1.ChartAreas("Default").CursorX.IsUserEnabled = False
chart1.ChartAreas("Default").CursorX.IsUserSelectionEnabled = False
chart1.ChartAreas("Default").BackGradientStyle = GradientStyle.None
'chart1.ChartAreas("Default").Position.Auto = True

chart1.ChartAreas("Default").Position.Auto = False
chart1.ChartAreas("Default").Position.X = 0
chart1.ChartAreas("Default").Position.Y = 10
chart1.ChartAreas("Default").Position.Width = ChartAreasWidth
chart1.ChartAreas("Default").Position.Height = ChartAreasHeight - 4

chart1.ChartAreas("Default").AxisX.ScaleView.Zoomable = True
chart1.ChartAreas("Default").AxisX.ScrollBar.IsPositionedInside = True
chart1.ChartAreas("Default").AxisX.MajorGrid.Enabled = False
chart1.ChartAreas("Default").AxisX.MajorGrid.LineWidth = 1

chart1.ChartAreas("Default").AxisX.IntervalType = DateTimeIntervalType.Weeks
chart1.ChartAreas("Default").AxisX.Interval = 1
chart1.ChartAreas("Default").AxisX.LabelAutoFitStyle = LabelAutoFitStyles.DecreaseFont
chart1.ChartAreas("Default").AxisX.LabelAutoFitMinFontSize = 7
chart1.ChartAreas("Default").AxisX.LabelStyle.Font = My.Settings.fontbold8
chart1.ChartAreas("Default").AxisX.LabelStyle.Angle = 90
chart1.ChartAreas("Default").AxisX.MajorTickMark.Enabled = True
chart1.ChartAreas("Default").AxisX.MinorTickMark.Enabled = False
chart1.ChartAreas("Default").AxisX.Minimum = von_X.ToOADate()
chart1.ChartAreas("Default").AxisX.Maximum = bis_X.ToOADate()
chart1.ChartAreas("Default").AxisX.IsMarginVisible = False

chart1.ChartAreas("Default").AxisY.MinorTickMark.Enabled = True
chart1.ChartAreas("Default").AxisY.MinorTickMark.TickMarkStyle = TickMarkStyle.InsideArea
chart1.ChartAreas("Default").AxisY.MajorGrid.LineWidth = 1
chart1.ChartAreas("Default").AxisY.MajorGrid.LineColor = Color.Black
chart1.ChartAreas("Default").AxisY.LabelStyle.Font = My.Settings.fontbold8
chart1.ChartAreas("Default").AxisY.LabelStyle.Format = "C0"
chart1.ChartAreas("Default").AxisY.LabelAutoFitStyle = LabelAutoFitStyles.DecreaseFont
chart1.ChartAreas("Default").AxisY.LabelAutoFitMinFontSize = 7
chart1.ChartAreas("Default").AxisY.Minimum = 0

chart1.ChartAreas("Default").AxisY2.LineDashStyle = ChartDashStyle.Solid
chart1.ChartAreas("Default").AxisY2.LineWidth = 1
chart1.ChartAreas("Default").AxisY2.LineColor = Color.Black
chart1.ChartAreas("Default").AxisY2.Enabled = AxisEnabled.True
chart1.ChartAreas("Default").AxisY2.MajorTickMark.Enabled = False
chart1.ChartAreas("Default").AxisY2.LabelStyle.ForeColor = Color.Transparent
chart1.ChartAreas("Default").AxisY2.LabelStyle.Font = My.Settings.fontbold8
chart1.ChartAreas("Default").AxisY2.MajorGrid.Enabled = False
chart1.ChartAreas("Default").AxisY2.LabelAutoFitStyle = LabelAutoFitStyles.DecreaseFont
chart1.ChartAreas("Default").AxisY2.LabelAutoFitMinFontSize = 7

chart1.ChartAreas("Default").BackColor = Color.White

GeneralMessage Closed Pin
1-Mar-22 19:44
MemberSteveButtler1-Mar-22 19:44 
QuestionI Need Help On Windows10 Pin
David_Vickers22-Dec-21 21:33
MemberDavid_Vickers22-Dec-21 21:33 
AnswerRe: I Need Help On Windows10 Pin
CHill6023-Dec-21 5:32
mveCHill6023-Dec-21 5:32 
GeneralRe: I Need Help On Windows10 Pin
David_Vickers23-Dec-21 19:05
MemberDavid_Vickers23-Dec-21 19:05 
GeneralRe: I Need Help On Windows10 Pin
Dave Kreskowiak24-Dec-21 4:55
mveDave Kreskowiak24-Dec-21 4:55 
GeneralMessage Closed Pin
6-Feb-22 1:43
Memberarshad hussain 20226-Feb-22 1:43 
GeneralMessage Closed Pin
6-Feb-22 1:46
Memberarshad hussain 20226-Feb-22 1:46 
GeneralMessage Closed Pin
6-Feb-22 1:46
Memberarshad hussain 20226-Feb-22 1:46 
GeneralMessage Closed Pin
6-Feb-22 1:46
Memberarshad hussain 20226-Feb-22 1:46 
GeneralMessage Closed Pin
6-Feb-22 1:46
Memberarshad hussain 20226-Feb-22 1:46 
GeneralMessage Closed Pin
6-Feb-22 1:46
Memberarshad hussain 20226-Feb-22 1:46 
GeneralMessage Closed Pin
6-Feb-22 1:46
Memberarshad hussain 20226-Feb-22 1:46 
GeneralMessage Closed Pin
6-Feb-22 1:46
Memberarshad hussain 20226-Feb-22 1:46 
QuestionReplace text with image in DataGridView Pin
Member 1524267116-Jul-21 19:40
MemberMember 1524267116-Jul-21 19:40 
AnswerRe: Replace text with image in DataGridView Pin
Richard MacCutchan16-Jul-21 21:35
mveRichard MacCutchan16-Jul-21 21:35 
GeneralRe: Replace text with image in DataGridView Pin
Member 1524267117-Jul-21 14:10
MemberMember 1524267117-Jul-21 14:10 
AnswerRe: Replace text with image in DataGridView Pin
Gerry Schmitz17-Jul-21 5:58
mveGerry Schmitz17-Jul-21 5:58 
QuestionZero detected as Null in Crystal Report Pin
Member 152426714-Jul-21 12:56
MemberMember 152426714-Jul-21 12:56 
AnswerRe: Zero detected as Null in Crystal Report Pin
tarco5-Jul-21 13:44
professionaltarco5-Jul-21 13:44 
GeneralRe: Zero detected as Null in Crystal Report Pin
Member 152426715-Jul-21 14:30
MemberMember 152426715-Jul-21 14:30 
GeneralRe: Zero detected as Null in Crystal Report Pin
tarco5-Jul-21 15:27
professionaltarco5-Jul-21 15:27 
GeneralRe: Zero detected as Null in Crystal Report Pin
Member 152426715-Jul-21 16:51
MemberMember 152426715-Jul-21 16:51 
GeneralRe: Zero detected as Null in Crystal Report Pin
Gerry Schmitz6-Jul-21 7:25
mveGerry Schmitz6-Jul-21 7:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.