none
Filling an Area between Two Spline series of different X Values RRS feed

  • Question

  • Hi Folks,

    How can I fill an area (image) between two series on a chart? The two series have different X values.

    Thanks

    Thursday, August 31, 2017 2:42 PM

Answers

  • Hi,

    Thanks. I am looking for binding between two X Values, not two Y values.

    Thanks

    Hi Nabil,

    According to your description, do you want to rotate the chart by 90 degrees , then fill the area between series?

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Nabil AL Adani Saturday, September 2, 2017 5:17 PM
    Friday, September 1, 2017 7:25 AM
    Moderator

All replies

  • Here is an example I modified from the docs here:

    https://code.msdn.microsoft.com/Samples-Environments-for-b01e9c61

    You need to get these docs to see more details.

    Public Class Form3
    
        Private Sub Form3_Load(sender As Object, e As EventArgs) Handles Me.Load
            Chart1.ChartAreas(0).AxisX.IsMarginVisible = False
    
            Chart1.Series.Add("Spline 1")
            Chart1.Series("Spline 1").ChartType = SeriesChartType.SplineRange
            Chart1.Series("Spline 1")("LineTension") = "0.5"
            Chart1.Series("Spline 1").MarkerColor = Color.MediumSeaGreen
            Chart1.Series("Spline 1").BackSecondaryColor = Color.Green
            Chart1.Series("Spline 1").BackGradientStyle = GradientStyle.DiagonalLeft
            Chart1.Series("Spline 1").BorderColor = Color.Black
            Chart1.Series("Spline 1").BorderWidth = 2
            Chart1.Series("Spline 1").BorderDashStyle = ChartDashStyle.Solid
    
    
            Dim yValue1 As Double() = {56, 74, 45, 59, 34, 87, 50, 87, 64, 34}
            Dim yValue2 As Double() = {42, 65, 30, 42, 25, 47, 40, 70, 34, 20}
            Chart1.Series("Spline 1").Points.DataBindY(yValue1, yValue2)
    
    
        End Sub
    End Class

    Thursday, August 31, 2017 4:18 PM
  • Hi,

    Thanks. I am looking for binding between two X Values, not two Y values.

    Thanks

    Thursday, August 31, 2017 11:05 PM
  • Hi,

    Thanks. I am looking for binding between two X Values, not two Y values.

    Thanks

    Hi Nabil,

    According to your description, do you want to rotate the chart by 90 degrees , then fill the area between series?

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Nabil AL Adani Saturday, September 2, 2017 5:17 PM
    Friday, September 1, 2017 7:25 AM
    Moderator