re-introduce graph width detection
This commit is contained in:
parent
99a58e7119
commit
d11950f9cf
@ -16,10 +16,14 @@ $(function () {
|
|||||||
var statsType = 'area';
|
var statsType = 'area';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// hack to statically set width as something is broken with div width calculation - anni
|
||||||
|
var chart_width = $(document).width() - 400;
|
||||||
|
|
||||||
if (statsType == 'line' || statsType == 'pie') {
|
if (statsType == 'line' || statsType == 'pie') {
|
||||||
$(this).hide().visualize({
|
$(this).hide().visualize({
|
||||||
type: statsType,
|
type: statsType,
|
||||||
// 'bar', 'area', 'pie', 'line'
|
// 'bar', 'area', 'pie', 'line'
|
||||||
|
width: chart_width,
|
||||||
height: '240px',
|
height: '240px',
|
||||||
colors: ['#6fb9e8', '#ec8526', '#9dc453', '#ddd74c'],
|
colors: ['#6fb9e8', '#ec8526', '#9dc453', '#ddd74c'],
|
||||||
lineDots: 'double',
|
lineDots: 'double',
|
||||||
@ -37,6 +41,7 @@ $(function () {
|
|||||||
} else {
|
} else {
|
||||||
$(this).hide().visualize({
|
$(this).hide().visualize({
|
||||||
// 'bar', 'area', 'pie', 'line'
|
// 'bar', 'area', 'pie', 'line'
|
||||||
|
width: chart_width,
|
||||||
type: statsType,
|
type: statsType,
|
||||||
height: '240px',
|
height: '240px',
|
||||||
colors: ['#6fb9e8', '#ec8526', '#9dc453', '#ddd74c']
|
colors: ['#6fb9e8', '#ec8526', '#9dc453', '#ddd74c']
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user