How do I fill everything over a straight line and under a curve?

前端 未结 3 805
星月不相逢
星月不相逢 2020-12-18 10:04

I am using the Charts component in Windows Forms.

I create a straight line using

chart1.Series[\"Grenzwert\"].Points.Add(new DataPoint(0         


        
3条回答
  •  天命终不由人
    2020-12-18 10:43

    You can do this as follows.

    1. Set the column fill like you did before. Everything will be red.
    2. Create a new column graph on the same chart.
    3. Set its values to the same as your jagged line, but capped at the y value of the straight line you already have.
    4. Set the fill colour for the columns to white. This will block out the red fill for any areas not between the lines.

提交回复
热议问题