# Chart or graph example for 1.2 that anypne would like to share

**URL:** <https://forum.genieacs.com/t/chart-or-graph-example-for-1-2-that-anypne-would-like-to-share/821>\
**Category:** Uncategorized\
**Created:** [June 4, 2020, 2:29am UTC](https://forum.genieacs.com/t/chart-or-graph-example-for-1-2-that-anypne-would-like-to-share/821 "2020-06-04T02:29:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![azael76](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@azael76](https://forum.genieacs.com/u/azael76)\
**Post date:** [June 4, 2020, 2:29am UTC](https://forum.genieacs.com/t/chart-or-graph-example-for-1-2-that-anypne-would-like-to-share/821/1 "2020-06-04T02:29:33Z")

</div>

Hi All,

I would like to add a few charts to the overview page but i am looking for some examples of the syntax. e.g for software versions on connected CPEs

Can anyone post some snippets the dont ming sharing?

Thanks

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [June 4, 2020, 6:39pm UTC](https://forum.genieacs.com/t/chart-or-graph-example-for-1-2-that-anypne-would-like-to-share/821/2 "2020-06-04T18:39:07Z")

</div>

Showing a breakdown of the software versions will require a lot of manual work on your part. To the best of my knowledge, there really isn’t a way to group/count via a generic query.

Here is an example of some graphs we have:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/b453d6931f257827d5b60c8ff7bfd009fd6511e8.png)

Here is the relevant code (This works in v1.1, we haven’t upgraded to v1.2 yet so I cannot guarantee that things work the same way in v1.2).

```json
  "online_past_24_hours": {
    "model" : [
      {
        "label" : "SmartRG 360",
        "color" : "#640264",
        "query" : {"VirtualParameters.Model" : "SR360n", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      },
      {
        "label" : "SmartRG 510",
        "color" : "#c58744",
        "query" : {"VirtualParameters.Model" : "SR510N", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      },
      {
        "label" : "SmartRG 515",
        "color" : "#fc6604",
        "query" : {"VirtualParameters.Model" : "SR515ac", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      },
      {
        "label" : "SmartRG 516",
        "color" : "#fcfe04",
        "query" : {"VirtualParameters.Model" : "SR516ac", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      },
      {
        "label" : "SmartRG 552",
        "color" : "#040163",
        "query" : {"VirtualParameters.Model" : "SR552n", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      },
      {
        "label" : "SmartRG 555",
        "color" : "#44b3c2",
        "query" : {"VirtualParameters.Model" : "SR555ac", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      }
    ],
    "mode" : [
      {
        "label" : "Routed",
        "color" : "#44b3c2",
        "query" : {"_tags" : "Managed", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      },
      {
        "label" : "Bridged",
        "color" : "#c58744",
        "query" : {"_tags" : "Bridged", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      }
    ],
    "access" : [
      {
        "label" : "Ethernet",
        "color" : "#44b3c2",
        "query" : {"VirtualParameters.WANAccessType" : "Ethernet", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      },
      {
        "label" : "DSL",
        "color" : "#fc6604",
        "query" : {"VirtualParameters.WANAccessType" : "DSL", "_lastInform" : {"$gt" : "<%= previous_24_hours %>"}}
      }
    ]
  },

```

---

<div class="post-metadata">

**Author:** ![vytasu](https://avatars.discourse-cdn.com/v4/letter/v/da6949/32.png) [@vytasu](https://forum.genieacs.com/u/vytasu)\
**Post date:** [June 5, 2020, 6:58am UTC](https://forum.genieacs.com/t/chart-or-graph-example-for-1-2-that-anypne-would-like-to-share/821/3 "2020-06-05T06:58:01Z")

</div>

I can share simple v1.2 example. Mostly I use “=” conditions. This sample means:  
1: if value exist and equal 192.168.1.1  
2: if value exist but not equal 192.168.1.1  
3: if value do not exist

> def\_lan:  
> label: “‘Default LAN’”  
> slices:  
> 1\_def\_lan:  
> color: “‘#99ccff’”  
> filter: Device.IP.Interface.1.IPv4Address.1.IPAddress = “192.168.1.1”  
> label: “‘Def\_LAN’”  
> 2\_custom:  
> color: “‘#003366’”  
> filter: Device.IP.Interface.1.IPv4Address.1.IPAddress \<\> “192.168.1.1”  
> label: “‘Custom\_LAN’”  
> 3\_blank\_lan:  
> color: “‘#a945ff’”  
> filter: Device.IP.Interface.1.IPv4Address.1.IPAddress IS NULL  
> label: “‘Blank\_LAN’”

---

<div class="post-metadata">

**Author:** ![azael76](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@azael76](https://forum.genieacs.com/u/azael76)\
**Post date:** [June 10, 2020, 4:34am UTC](https://forum.genieacs.com/t/chart-or-graph-example-for-1-2-that-anypne-would-like-to-share/821/4 "2020-06-10T04:34:04Z")

</div>

Thank you vytasu. that got me somehwre but YAML logic eludes me still.

See the following.

> firmware:  
> label: “‘Firmware Versions’”  
> slices:  
> 1\_def\_lan:  
> color: “‘#99ccff’”  
> filter: Device.DeviceInfo.SoftwareVersion = “6.47”  
> label: “‘6.47’”  
> 2\_custom:  
> color: “‘#003366’”  
> filter: Device.DeviceInfo.SoftwareVersion = “6.45.9”  
> label: “‘6.45.9’”  
> **3\_blank\_lan:**  
> \*\* color: “‘#a945ff’”\*\*  
> \*\* filter: (Device.DeviceInfo.SoftwareVersion NOT LIKE “6.45.9”) OR\*\*  
> \*\* (Device.DeviceInfo.SoftwareVersion NOT LIKE “6.47”)\*\*  
> \*\* label: “‘Other’”\*\*

the OR is getting me

---

<div class="post-metadata">

**Author:** ![vytasu](https://avatars.discourse-cdn.com/v4/letter/v/da6949/32.png) [@vytasu](https://forum.genieacs.com/u/vytasu)\
**Post date:** [June 10, 2020, 7:18am UTC](https://forum.genieacs.com/t/chart-or-graph-example-for-1-2-that-anypne-would-like-to-share/821/5 "2020-06-10T07:18:12Z")

</div>

If you want other than these two, try this logic:

> filter: NOT (Device.DeviceInfo.SoftwareVersion = “6.47” OR Device.DeviceInfo.SoftwareVersion = “6.45.9”)

---

<div class="post-metadata">

**Author:** ![azael76](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@azael76](https://forum.genieacs.com/u/azael76)\
**Post date:** [July 19, 2020, 11:46pm UTC](https://forum.genieacs.com/t/chart-or-graph-example-for-1-2-that-anypne-would-like-to-share/821/6 "2020-07-19T23:46:38Z")

</div>

That worked beautifully. Thank you.
