Skip to content

Static

Description

static

Attributes

  • tile=static
  • title
  • body: Provide a text to be display also allow a template string to display in the body from dispatches values.
  • tag: Provide a tag name to display a body in specified tag
  • styles: styles for the widget,title and charts
  • chart: true | false
  • rewrite: [Array of objects] Rewriting of styles based on dispatches data. target: define a target as styles template: actual style with we want to rewriting[provide a dynamic path] *to: on which we want to apply the styles that target address

Example

 {
  "tile": "static",
  "body": "Hello testing a static tile",
  "tag": "h5",
  "styles": {
    "root": {
      "color": "#E9ECBE"
    },
    "title": {
      "color": "#E9ECBE"
    }
  }
}

Example2

{
  "tile": "static",
  "body": "Hello testing a static tile",
  "tag": "h5",
   "chart": true,
   "classes": {
    "widget": "text-left font-size-120 font-weight-bold",
    "root": "my-2"
  },
  "styles": {
    "root": {
      "color": "#E9ECBE"
    },
    "title": {
      "color": "#000000"
    },
     "chart": {
      "border": "5px solid #0F4FCC",
      "height": "20px",
      "width": "100px",
      "marginBottom": "5px"
    },
    "inner": {
      "width": "5%",
      "height": "100%",
      "backgroundColor": "#0F4FCC"
    }
  }
}

Rewriting of styles

Example3

{
  "rewrite": [
    {
      "target": "styles",
      "template": "{data.completion}",
      "to": "inner.width"
    }
  ]
}