Jump to content
Software FX Community

Negative values YAxis is not Visible

Camilo Andres

Recommended Posts

Hello I have the following problem, when my graph has a single value ant this isnegative this is not displayed properly, but if they are multiplesvalues negative and positive then this is shown correctly

For example  

 Case Incorrect 

if Data Source is = { (1,-5) } 

The graph is empty Incorrect


Correct Case 

 if Data Source is { (1,-5) , (1,8)  }

The graph is properly visualization


 The code

Public Sub New()    ' This call is required by the Windows Form Designer.   InitializeComponent()   ' Add any initialization after the InitializeComponent() call.   InitGraph()   newChart.DataSourceSettings.DataSource = Me.InitData("")   End Sub


  Private Sub InitGraph()   Dim ConditionalAttributes1 As SoftwareFX.ChartFX.ConditionalAttributes = New SoftwareFX.ChartFX.ConditionalAttributes   Dim ConditionalAttributes2 As SoftwareFX.ChartFX.ConditionalAttributes = New SoftwareFX.ChartFX.ConditionalAttributes   Me.newChart.AxisY.LabelsFormat.Decimals = 0   Me.newChart.AxisY.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.Number   Me.newChart.AxisX.LabelAngle = 90   ConditionalAttributes1.AlternateColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(128, Byte), Integer))   ConditionalAttributes1.Color = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(0, Byte), Integer))   ConditionalAttributes1.Condition.To = 0   ConditionalAttributes1.Legend = "Corto"   ConditionalAttributes2.Condition.From = 0   ConditionalAttributes2.Legend = "Largo"   ConditionalAttributes2.Series = 1   Me.newChart.ConditionalAttributes.AddRange(New SoftwareFX.ChartFX.ConditionalAttributes() {ConditionalAttributes1, ConditionalAttributes2})   Me.newChart.Dock = System.Windows.Forms.DockStyle.Fill   Me.newChart.Location = New System.Drawing.Point(0, 25)   Me.newChart.Name = "newChart"   Me.newChart.Size = New System.Drawing.Size(150, 125)   Me.newChart.TabIndex = 3   End Sub

    Public Shadows Function InitData(Optional ByVal Filter As String = "") As Object   Dim RmtDs As Finac.RemoteDataSet.RemoteDataSet = Finac.RemoteDataSet.RemoteDataSet.GetInstance   Dim dv As New DataView(RmtDs.Tables("f_pos"), Filter, "ESPECIE ASC", DataViewRowState.CurrentRows)   If dv.Count = 0 Then   Return 0   Else   Return dv.ToTable(False, New String() {"ESPECIE", "POSICION_NETA"})   End If   End Function

Help me please

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...