Looking for an example of a custom widget using trendlines

Tags: #<Tag:0x00007f173d191490> #<Tag:0x00007f173d1913a0>

I have a custom widget for displaying an Ecobee thermostat that I’m working on, and I’d like to include a trendline similar to what you can get with the oh-cell-label widget, but I’ve had no luck guessing how it should work or finding any examples that I could use as a starting point.

               - component: f7-row
                  slots:
                    default:
                      - component: f7-col
                        config:
                          style:
                            position: absolute
                            top: 130px
                          class: justify-content-flex-start
                        slots:
                          default:
                           - component: oh-trend
                              config:
                                visible: "=props.showTrend ? true : false"
                                trendItem: =props.item
                                trendGradient:
                                  - "#FFE7DD"
                                  - "#FFD1BD"

This is a widget i have

Thanks. That’s pretty close to what I have … now to sort out what I’ve got wrong. Good to have a baseline for comparison.

Turns out my issue was that I was specifying the trend item as items.<itemname> instead of just <itemname>. D’oh!