-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Conversation
@yotamberk Can you please create a new example for this new feature and lead the old subgroup example as it is. |
sure |
@mojoaxel done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice but still a little room for improvements :-)
<head> | ||
<title>Timeline | Subgroups</title> | ||
|
||
<style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom styles should be defined after importing "vis.css" to be able to overwrite them.
start: '2014-01-21', | ||
end: '2014-01-22', | ||
type: 'background', | ||
className: 'negative', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the css class .negative
is never used. You should add to the top:
.vis-item.vis-background.negative {
background-color: rgba(255, 0, 0, 0.2);
}
.vis-item.vis-background.positive {
background-color: rgba(105, 255, 98, 0.20);
}
background-color: transparent; | ||
border-width: 1px; | ||
border-style: dashed!important; | ||
border-color: grey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only style you need to change is border-style: dashed;
|
||
// add items to the DataSet | ||
items.add([ | ||
// group 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
group:'group1', | ||
subgroup:'sg_3' | ||
}, | ||
// group 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
end: '2014-01-22', | ||
group:'group2' | ||
}, | ||
// general |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
</head> | ||
<body> | ||
|
||
<p>This example shows the workings of the subgroups. Subgroups do not use stacking, and only work when stacking is disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see it this example shows two new concepts:
- Make subGroups stackable
- show overlay of elements like descripted in Introduce a new item that has two start and two end times. #497
I would recommend integrating the "stackSubgroups" option in the existing "subgroups" example and creating a new example that only shows how to realize the #497 feature. I think this are two separated thinks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
group:'group1', | ||
subgroup:'sg_2' | ||
}, | ||
// subgroup 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe 2 subgroups are enough? The examples should be as "slim" as possible.
I liked that comment. I did it. |
Allow doing doing things like: #497 (see subgroups example)