Chart Pro connect line points with values only |
Post Reply |
Author | |
mfstuart
Newbie Joined: 28 May 2013 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 28 May 2013 at 6:39pm |
Hi all,
I'm brand new to the Chart Pro ActiveX.
I've created a Chart Pro v15.3.1 Dashed Line chart with 7 X axis points. 3 of the points have values greater than zero and the other 4 equal zero. I want a line to the 3 points with values greater than zero only, not have the chart draw the line to all the points. How do I do that? Are there properties to set that? Here's my VB6 code: '===== Option Explicit Private Sub Form_Load() AddTitle "Height-To-Age", myChart AddHeightSeries AddHeightAxis End Sub Private Sub AddTitle(ByVal Title As String, ByRef oChart As ChartControl) Dim oContent As ChartContent Dim oTitle As ChartTitle Set oContent = oChart.Content Set oTitle = oContent.Titles.Add("<TextBlock FontSize='14px' Foreground='Blue'>" & Title & "</TextBlock>") oContent.EnableMarkup = True oContent.Legend.Visible = False End Sub Private Sub AddHeightSeries() Dim Series As ChartSeries Set Series = myChart.Content.Series.Add("Height") With Series .Name = "Height" .Points.Add 24, 0 .Points.Add 60, 34 .Points.Add 96, 0 .Points.Add 132, 51 .Points.Add 168, 67 .Points.Add 204, 0 .Points.Add 240, 0 End With Dim oStyle As ChartSplineSeriesStyle Set oStyle = New ChartSplineSeriesStyle oStyle.LineStyle.DashStyle = xtpChartDashStyleDash Set myChart.Content.Series(0).Style = oStyle End Sub Private Sub AddHeightAxis() Dim Diagram As ChartDiagram2D Set Diagram = myChart.Content.Series(0).Diagram If Not (Diagram Is Nothing) Then With Diagram .AxisX.Title.Text = "Age Months" .AxisX.Title.Visible = True .AxisY.Title.Text = "Height Inches" .AxisY.Title.Visible = True End With End If End Sub '===== |
|
Thanx,
Mark Stuart VB6 Magic eDeveloper v9 uniPaaS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |