PowerChart Dynamic coloring of trend

I am using the Power Chart to trend a tag value history, with setpoint ranges.


I am using a UDT, that takes in a Analog input value, and if the tag value is in any of these ranges, it will be historized.
If the tag value isnt in range, I set the value to -9999, then set the range of the axis to 0-1000 to hide the negative values
I then made 5 pens on the power chart, all set to each tag history to create a Red,Yellow,Green,Yellow,Red scheme


The chart looks close but I can not get a smooth transition between the values.
Here is a pen configuration for the individual tags

{
  "axis": "Flow meter",
  "data": {
    "aggregateMode": "default",
    "source": "histprov:default:/tag:/ww_flow_rate/normal"
  },
  "display": {
    "breakLine": true,
    "interpolation": "curveStep",
    "radius": 3,
    "styles": {
      "normal": {
        "fill": {
          "color": "#4FAE4C",
          "opacity": 1
        },
        "stroke": {
          "color": "#4FAE4C",
          "dashArray": 0,
          "opacity": 1,
          "width": 1
        }
      }
    },
    "type": "area"
  },
  "enabled": true,
  "name": "Water Flow Rate",
  "plot": 0,
  "selectable": false,
  "visible": true
}

Does anyone know of a way to optimize this or a way to create something similar in a different component?

Have you looked into the tag math for what tags are on and when? It looks like your chart is set up correctly, but the values are not turning on one after the other and that is why you're getting the odd gaps in the chart. You could also look at doing a binding on the fill property to do different colors, but that might be more work than it's worth based on where else you're using the UDT.

I was able to solve the data gaps between them, but i'm definitely fighting the point to point pen drawing making large cuts into the graph

I cant seem to modify the dataset in a powerchart, so if I set a binding on the pen fill color, the entire pen becomes that color.

ive tried segmenting the data for a time series chart, where ive removed any values that arnt within each range, but I cant find a way to color each area chart individually.