-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add padding to svg width and height to fix axis overflow issues. #224
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>LIS Web-Components - <lis-modal-element></title> | ||
<!-- CSS framework --> | ||
<link rel="stylesheet" type="text/css" href="../../node_modules/uikit/dist/css/uikit.min.css"> | ||
<script src="../../node_modules/uikit/dist/js/uikit.min.js"></script> | ||
<!-- web components polyfills --> | ||
<script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> | ||
<script src="../../node_modules/lit/polyfill-support.js"></script> | ||
<!-- web components --> | ||
<script type="module" src="../../dist/web-components.min.js"></script> | ||
</head> | ||
|
||
<body> | ||
|
||
<div class="uk-container"> | ||
<h1><lis-histogram-element></h1> | ||
<p> | ||
The <code><lis-histogram-element></code> the <code><lis-simple-table-element></code> web component. | ||
See the source code and documentation for details. | ||
</p> | ||
<hr> | ||
<lis-simple-table-element id="table"></lis-simple-table-element> | ||
</div> | ||
|
||
<!--Set all attributes/properties via JavaScript for lis-simple-table-element--> | ||
<script type="text/javascript"> | ||
// get the simple table element | ||
window.onload = (event) => { | ||
const tableElement = document.getElementById('table'); | ||
// set the element's properties | ||
tableElement.caption = 'My cheesy table'; | ||
tableElement.dataAttributes = ['cheese', 'region', 'raing']; | ||
tableElement.header = {cheese: 'Cheese', region: 'Region', rating: 'Rating'}; | ||
tableElement.data = [ | ||
{cheese: 'Brie', region: 'France', rating: 7}, | ||
{cheese: 'Burrata', region: 'Italy', rating: 8}, | ||
{cheese: 'Feta', region: 'Greece', rating: 7}, | ||
{cheese: 'Gouda', region: 'Netherlands', rating: 9}, | ||
{cheese: 'Cheddar', region: 'America', raing: 6}, | ||
{cheese: 'Goat', region: 'America', raing: 2} | ||
]; | ||
} | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |