The problem of Segmentation Line of svg

how do I realize that the line below the maximum (warning line) is red two and the one above the maximum is another color? Similar to this effect

my code:
< path

      d={lineGen(data)} 
      stroke={arr > base.baseValue ? line.color : "red"} 
      fill="none" 
      strokeDasharray={line.lineType === "dash" ? "3 3" : null}
      strokeWidth={line.lineWidth}/>
The problem with

is that my segments are made up of a complete path, and according to my code are all red segments. Please give us your opinions

.
Aug.03,2021

hh solved using two clipPath

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a18b-2c1fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a18b-2c1fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?