Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

stackSubgroups option #2519

Merged
merged 23 commits into from
Dec 31, 2016
Merged

stackSubgroups option #2519

merged 23 commits into from
Dec 31, 2016

Conversation

yotamberk
Copy link
Contributor

Allow doing doing things like: #497 (see subgroups example)

@yotamberk yotamberk added this to the Minor Release v4.18 milestone Dec 31, 2016
@mojoaxel
Copy link
Member

@yotamberk Can you please create a new example for this new feature and lead the old subgroup example as it is.

@yotamberk
Copy link
Contributor Author

sure

@yotamberk
Copy link
Contributor Author

@mojoaxel done

Copy link
Member

@mojoaxel mojoaxel left a 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>
Copy link
Member

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',
Copy link
Member

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;
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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.
Copy link
Member

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:

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.

Copy link
Contributor Author

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
Copy link
Member

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.

@yotamberk
Copy link
Contributor Author

@mojoaxel

As far as I can see it this example shows two new concepts:
Make subGroups stackable
show overlay of elements like descripted in #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.

I liked that comment. I did it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants