Skip to content

Commit

Permalink
added width
Browse files Browse the repository at this point in the history
  • Loading branch information
duanefields committed May 5, 2015
1 parent 2891e9b commit 802c105
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -225,3 +225,9 @@ _<string>_

Grouping, currently only supports the option "week" which groups all the data by the start of the week, using your
first date column as the key. Simply sums all the other property fields.

### width

<length>

Width of the nested chart element. Defaults to 26em
4 changes: 2 additions & 2 deletions demo.html
Expand Up @@ -10,7 +10,7 @@
<style>
body {
font-family: "Helvetica Neue", "Helvetica", Arial;
background-color: antiquewhite;
background-color: white;
}
</style>
</head>
Expand Down Expand Up @@ -106,7 +106,7 @@ <h2>Charts From Epiquery</h2>
cols="[{'id':'date', 'type':'date'}, {'id':'applied'}, {'id':'accepted'}, {'id':'paid'}]">
</ui-stats-chart>

<ui-stats-chart name="Epiquery: Multiple Y Columns (area, by week)" limit="30" groupBy="week"
<ui-stats-chart name="Epiquery: Multiple Y Columns (area, by week)" limit="30" groupBy="week" width="54.5em"
src="https://query.glgroup.com/councilApplicant/getStats.mustache" type="area"
cols="[{'id':'date', 'type':'date'}, {'id':'applied'}, {'id':'accepted'}, {'id':'paid'}]">
</ui-stats-chart>
Expand Down
2 changes: 1 addition & 1 deletion src/ui-stats-chart.html
@@ -1,4 +1,4 @@
<polymer-element name="ui-stats-chart" attributes="data src limit name smooth type cols groupBy">
<polymer-element name="ui-stats-chart" attributes="data src limit name smooth type cols groupBy width">
<link rel="import" href="../bower_components/google-chart/google-chart.html">

<template>
Expand Down
4 changes: 1 addition & 3 deletions src/ui-stats-chart.less
Expand Up @@ -5,8 +5,6 @@
display: inline-block;
margin: 1em;
.border;
width: 26em;
height: 12em;
overflow: hidden;
background-color: @white;
}
Expand All @@ -31,7 +29,7 @@
}

#chart {
width: 100%;
width: 26em;
height: 11em;
}

Expand Down
3 changes: 3 additions & 0 deletions src/ui-stats-chart.litcoffee
Expand Up @@ -10,6 +10,9 @@ The Chart tile displays a chart in various formats
## Attributes and Change Handlers

widthChanged: ->
@$.chart.style.width = @width
srcChanged: ->
@loading = true
request.getAsync(@src)
Expand Down

0 comments on commit 802c105

Please sign in to comment.