ColorGrid disappears when you set Left Axis minimum value

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
mweaver
Newbie
Newbie
Posts: 11
Joined: Wed Jun 22, 2005 4:00 am

ColorGrid disappears when you set Left Axis minimum value

Post by mweaver » Fri May 19, 2006 6:27 pm

I have a ColorGrid and I need to set the axis values. The ColorGrid works fine until I set the axis minimum value - and then the ColorGrid disappears. Sample code that illustrates the problem is shown below.

Any ideas?

-----------------------

Code: Select all

Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
	Friend WithEvents tChart1 As Steema.TeeChart.TChart
	Friend WithEvents ColorGrid1 As Steema.TeeChart.Styles.ColorGrid
	Friend WithEvents btnButton1 As System.Windows.Forms.Button
	Friend WithEvents lblLabel1 As System.Windows.Forms.Label
	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
		Me.tChart1 = New Steema.TeeChart.TChart
		Me.ColorGrid1 = New Steema.TeeChart.Styles.ColorGrid
		Me.btnButton1 = New System.Windows.Forms.Button
		Me.lblLabel1 = New System.Windows.Forms.Label
		Me.SuspendLayout()
		'
		'tChart1
		'
		Me.tChart1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
								Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
		'
		'tChart1.Aspect
		'
		Me.tChart1.Aspect.View3D = False
		'
		'tChart1.Axes
		'
		'
		'tChart1.Axes.Bottom
		'
		'
		'tChart1.Axes.Bottom.Grid
		'
		Me.tChart1.Axes.Bottom.Grid.ZPosition = 0
		'
		'tChart1.Axes.Bottom.Labels
		'
		'
		'tChart1.Axes.Bottom.Labels.Font
		'
		'
		'tChart1.Axes.Bottom.Labels.Font.Shadow
		'
		Me.tChart1.Axes.Bottom.Labels.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Bottom.Labels.Shadow
		'
		Me.tChart1.Axes.Bottom.Labels.Shadow.Visible = False
		'
		'tChart1.Axes.Bottom.Title
		'
		'
		'tChart1.Axes.Bottom.Title.Font
		'
		'
		'tChart1.Axes.Bottom.Title.Font.Shadow
		'
		Me.tChart1.Axes.Bottom.Title.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Bottom.Title.Shadow
		'
		Me.tChart1.Axes.Bottom.Title.Shadow.Visible = False
		'
		'tChart1.Axes.Depth
		'
		'
		'tChart1.Axes.Depth.Grid
		'
		Me.tChart1.Axes.Depth.Grid.ZPosition = 0
		'
		'tChart1.Axes.Depth.Labels
		'
		'
		'tChart1.Axes.Depth.Labels.Font
		'
		'
		'tChart1.Axes.Depth.Labels.Font.Shadow
		'
		Me.tChart1.Axes.Depth.Labels.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Depth.Labels.Shadow
		'
		Me.tChart1.Axes.Depth.Labels.Shadow.Visible = False
		'
		'tChart1.Axes.Depth.Title
		'
		'
		'tChart1.Axes.Depth.Title.Font
		'
		'
		'tChart1.Axes.Depth.Title.Font.Shadow
		'
		Me.tChart1.Axes.Depth.Title.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Depth.Title.Shadow
		'
		Me.tChart1.Axes.Depth.Title.Shadow.Visible = False
		'
		'tChart1.Axes.DepthTop
		'
		'
		'tChart1.Axes.DepthTop.Grid
		'
		Me.tChart1.Axes.DepthTop.Grid.ZPosition = 0
		'
		'tChart1.Axes.DepthTop.Labels
		'
		'
		'tChart1.Axes.DepthTop.Labels.Font
		'
		'
		'tChart1.Axes.DepthTop.Labels.Font.Shadow
		'
		Me.tChart1.Axes.DepthTop.Labels.Font.Shadow.Visible = False
		'
		'tChart1.Axes.DepthTop.Labels.Shadow
		'
		Me.tChart1.Axes.DepthTop.Labels.Shadow.Visible = False
		'
		'tChart1.Axes.DepthTop.Title
		'
		'
		'tChart1.Axes.DepthTop.Title.Font
		'
		'
		'tChart1.Axes.DepthTop.Title.Font.Shadow
		'
		Me.tChart1.Axes.DepthTop.Title.Font.Shadow.Visible = False
		'
		'tChart1.Axes.DepthTop.Title.Shadow
		'
		Me.tChart1.Axes.DepthTop.Title.Shadow.Visible = False
		'
		'tChart1.Axes.Left
		'
		'
		'tChart1.Axes.Left.Grid
		'
		Me.tChart1.Axes.Left.Grid.ZPosition = 0
		'
		'tChart1.Axes.Left.Labels
		'
		'
		'tChart1.Axes.Left.Labels.Font
		'
		'
		'tChart1.Axes.Left.Labels.Font.Shadow
		'
		Me.tChart1.Axes.Left.Labels.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Left.Labels.Shadow
		'
		Me.tChart1.Axes.Left.Labels.Shadow.Visible = False
		'
		'tChart1.Axes.Left.Title
		'
		'
		'tChart1.Axes.Left.Title.Font
		'
		'
		'tChart1.Axes.Left.Title.Font.Shadow
		'
		Me.tChart1.Axes.Left.Title.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Left.Title.Shadow
		'
		Me.tChart1.Axes.Left.Title.Shadow.Visible = False
		'
		'tChart1.Axes.Right
		'
		'
		'tChart1.Axes.Right.Grid
		'
		Me.tChart1.Axes.Right.Grid.ZPosition = 0
		'
		'tChart1.Axes.Right.Labels
		'
		'
		'tChart1.Axes.Right.Labels.Font
		'
		'
		'tChart1.Axes.Right.Labels.Font.Shadow
		'
		Me.tChart1.Axes.Right.Labels.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Right.Labels.Shadow
		'
		Me.tChart1.Axes.Right.Labels.Shadow.Visible = False
		'
		'tChart1.Axes.Right.Title
		'
		'
		'tChart1.Axes.Right.Title.Font
		'
		'
		'tChart1.Axes.Right.Title.Font.Shadow
		'
		Me.tChart1.Axes.Right.Title.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Right.Title.Shadow
		'
		Me.tChart1.Axes.Right.Title.Shadow.Visible = False
		'
		'tChart1.Axes.Top
		'
		'
		'tChart1.Axes.Top.Grid
		'
		Me.tChart1.Axes.Top.Grid.ZPosition = 0
		'
		'tChart1.Axes.Top.Labels
		'
		'
		'tChart1.Axes.Top.Labels.Font
		'
		'
		'tChart1.Axes.Top.Labels.Font.Shadow
		'
		Me.tChart1.Axes.Top.Labels.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Top.Labels.Shadow
		'
		Me.tChart1.Axes.Top.Labels.Shadow.Visible = False
		'
		'tChart1.Axes.Top.Title
		'
		'
		'tChart1.Axes.Top.Title.Font
		'
		'
		'tChart1.Axes.Top.Title.Font.Shadow
		'
		Me.tChart1.Axes.Top.Title.Font.Shadow.Visible = False
		'
		'tChart1.Axes.Top.Title.Shadow
		'
		Me.tChart1.Axes.Top.Title.Shadow.Visible = False
		'
		'tChart1.Footer
		'
		'
		'tChart1.Footer.Font
		'
		'
		'tChart1.Footer.Font.Shadow
		'
		Me.tChart1.Footer.Font.Shadow.Visible = False
		'
		'tChart1.Footer.Shadow
		'
		Me.tChart1.Footer.Shadow.Visible = False
		'
		'tChart1.Header
		'
		'
		'tChart1.Header.Font
		'
		'
		'tChart1.Header.Font.Shadow
		'
		Me.tChart1.Header.Font.Shadow.Visible = False
		Me.tChart1.Header.Lines = New String() {"TeeChart"}
		'
		'tChart1.Header.Shadow
		'
		Me.tChart1.Header.Shadow.Visible = False
		'
		'tChart1.Legend
		'
		'
		'tChart1.Legend.Font
		'
		'
		'tChart1.Legend.Font.Shadow
		'
		Me.tChart1.Legend.Font.Shadow.Visible = False
		Me.tChart1.Legend.MaxNumRows = 8
		'
		'tChart1.Legend.Title
		'
		'
		'tChart1.Legend.Title.Font
		'
		Me.tChart1.Legend.Title.Font.Bold = True
		'
		'tChart1.Legend.Title.Font.Shadow
		'
		Me.tChart1.Legend.Title.Font.Shadow.Visible = False
		'
		'tChart1.Legend.Title.Pen
		'
		Me.tChart1.Legend.Title.Pen.Visible = False
		'
		'tChart1.Legend.Title.Shadow
		'
		Me.tChart1.Legend.Title.Shadow.Visible = False
		Me.tChart1.Location = New System.Drawing.Point(8, 8)
		Me.tChart1.Name = "tChart1"
		'
		'tChart1.Panel
		'
		'
		'tChart1.Panel.Shadow
		'
		Me.tChart1.Panel.Shadow.Visible = False
		Me.tChart1.Series.Add(Me.ColorGrid1)
		Me.tChart1.Size = New System.Drawing.Size(656, 488)
		'
		'tChart1.SubFooter
		'
		'
		'tChart1.SubFooter.Font
		'
		'
		'tChart1.SubFooter.Font.Shadow
		'
		Me.tChart1.SubFooter.Font.Shadow.Visible = False
		'
		'tChart1.SubFooter.Shadow
		'
		Me.tChart1.SubFooter.Shadow.Visible = False
		'
		'tChart1.SubHeader
		'
		'
		'tChart1.SubHeader.Font
		'
		'
		'tChart1.SubHeader.Font.Shadow
		'
		Me.tChart1.SubHeader.Font.Shadow.Visible = False
		'
		'tChart1.SubHeader.Shadow
		'
		Me.tChart1.SubHeader.Shadow.Visible = False
		Me.tChart1.TabIndex = 0
		'
		'tChart1.Walls
		'
		'
		'tChart1.Walls.Back
		'
		Me.tChart1.Walls.Back.AutoHide = False
		'
		'tChart1.Walls.Back.Shadow
		'
		Me.tChart1.Walls.Back.Shadow.Visible = False
		'
		'tChart1.Walls.Bottom
		'
		Me.tChart1.Walls.Bottom.AutoHide = False
		'
		'tChart1.Walls.Bottom.Shadow
		'
		Me.tChart1.Walls.Bottom.Shadow.Visible = False
		'
		'tChart1.Walls.Left
		'
		Me.tChart1.Walls.Left.AutoHide = False
		'
		'tChart1.Walls.Left.Shadow
		'
		Me.tChart1.Walls.Left.Shadow.Visible = False
		'
		'tChart1.Walls.Right
		'
		Me.tChart1.Walls.Right.AutoHide = False
		'
		'tChart1.Walls.Right.Shadow
		'
		Me.tChart1.Walls.Right.Shadow.Visible = False
		'
		'ColorGrid1
		'
		'
		'ColorGrid1.Brush
		'
		Me.ColorGrid1.Brush.Color = System.Drawing.Color.Red
		'
		'ColorGrid1.Marks
		'
		Me.ColorGrid1.Marks.ArrowLength = 0
		'
		'ColorGrid1.Marks.Callout
		'
		Me.ColorGrid1.Marks.Callout.Arrow = Me.ColorGrid1.Marks.Arrow
		Me.ColorGrid1.Marks.Callout.ArrowHead = Steema.TeeChart.Styles.ArrowHeadStyles.None
		Me.ColorGrid1.Marks.Callout.ArrowHeadSize = 8
		'
		'ColorGrid1.Marks.Callout.Brush
		'
		Me.ColorGrid1.Marks.Callout.Brush.Color = System.Drawing.Color.Black
		Me.ColorGrid1.Marks.Callout.Distance = 0
		Me.ColorGrid1.Marks.Callout.Draw3D = False
		Me.ColorGrid1.Marks.Callout.Length = 0
		Me.ColorGrid1.Marks.Callout.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle
		'
		'ColorGrid1.Marks.Font
		'
		'
		'ColorGrid1.Marks.Font.Shadow
		'
		Me.ColorGrid1.Marks.Font.Shadow.Visible = False
		Me.ColorGrid1.NumXValues = 50
		Me.ColorGrid1.NumZValues = 50
		Me.ColorGrid1.PaletteMin = 0
		Me.ColorGrid1.PaletteStep = 0
		Me.ColorGrid1.Title = "colorGrid1"
		Me.ColorGrid1.UseColorRange = False
		Me.ColorGrid1.UsePalette = True
		Me.ColorGrid1.XStep = 1
		'
		'ColorGrid1.XValues
		'
		Me.ColorGrid1.XValues.DataMember = "X"
		'
		'ColorGrid1.YValues
		'
		Me.ColorGrid1.YValues.DataMember = "Y"
		Me.ColorGrid1.ZStep = 1
		'
		'ColorGrid1.ZValues
		'
		Me.ColorGrid1.ZValues.DataMember = "Z"
		'
		'btnButton1
		'
		Me.btnButton1.Location = New System.Drawing.Point(480, 520)
		Me.btnButton1.Name = "btnButton1"
		Me.btnButton1.Size = New System.Drawing.Size(88, 32)
		Me.btnButton1.TabIndex = 1
		Me.btnButton1.Text = "Adjust Axis"
		'
		'lblLabel1
		'
		Me.lblLabel1.Location = New System.Drawing.Point(16, 512)
		Me.lblLabel1.Name = "lblLabel1"
		Me.lblLabel1.Size = New System.Drawing.Size(456, 40)
		Me.lblLabel1.TabIndex = 2
		Me.lblLabel1.Text = "The ColorGrid looks fine until you adjust the axis minimum value - then the Color" & _
		"Grid disappears."
		'
		'Form1
		'
		Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14)
		Me.ClientSize = New System.Drawing.Size(672, 597)
		Me.Controls.Add(Me.lblLabel1)
		Me.Controls.Add(Me.btnButton1)
		Me.Controls.Add(Me.tChart1)
		Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Name = "Form1"
		Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
		Me.Text = "Form1"
		Me.ResumeLayout(False)

	End Sub

#End Region

	Private Sub btnButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnButton1.Click
		With Me.tChart1.Axes.Left
			.Automatic = False
			.AutomaticMaximum = False
			.AutomaticMinimum = False
			.Minimum = 0
		End With
	End Sub

	Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
		Me.ColorGrid1.FillSampleValues(100)
	End Sub
End Class

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon May 22, 2006 9:44 am

Hi mweaver,

I'm unable to reproduce the problem here. Which TeeChart version are you using? Could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroups.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

mweaver
Newbie
Newbie
Posts: 11
Joined: Wed Jun 22, 2005 4:00 am

Post by mweaver » Mon May 22, 2006 1:37 pm

I posted a complete sample to the newsgroup as requested. When you run the app, it loads the form with a ColorGrid and automatic axis values. When you click the "Adjust Axis" button, it changes the axis values and the ColorGrid disappears.

I'm using TeeChart v2.0.2179.21171

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon May 22, 2006 1:54 pm

Hi mweaver,

Thanks for the example.

It works fine for me here using the latest maintenance release from 8th May. Could you please test if it works at your end?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply