Hi,
I cant get the timeline widget to work.
I’ve read alot about how to get it working with the nested divs etc like the knob widget… but somehow it seems i miss something.
this is my code used in a custom widget:
<div style="position: relative; top: 0; left: 0; width: 100%; height: 100%" ng-init='model={
"name": "WidgetTimeline",
"sizeX": 4,
"sizeY": 4,
"item": null,
"type": "timeline",
"row": 0,
"col": 0,
"period": "D",
"colorMaps": [
{
"state": "0",
"color": "#FFF",
},
{
"state": "1",
"color": "#FFCCCC",
},
{
"state": "2",
"color": "#FF9999",
},
],
"series": [
{
"item": "Item_Name",
"name": "Where"
}
]
}'>
<div style="position: relative; top: 0; left: 0; width: 100%; height: 100%">
<div>
<div><widget-timeline ng-model="model"></widget-timeline></div>
</div>
</div>
</div>
EDIT:
and i also tried another approch in this example with minimal code…and i added a config value “item” with the specific item i want to show. this gives me the same output like show in the right image.
<div style="position: relative; top: 0; left: 0; width: 100%; height: 100%" ng-init="model={
name: 'WidgetTimeline2',
period: 'D',
colorMaps: [
{
state: 'INSIDE',
color: '#FFF',
},
{
state: 'OUTSIDE',
color: '#FFCCCC',
}
],
series: [
{
item: config.where_item,
name: 'Where'
}
]
}">
<div style="position: relative; top: 0; left: 0; width: 100%; height: 100%">
<div width="100%">
<div><widget-timeline ng-model="model"></widget-timeline></div>
</div>
</div>
</div>