1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

Fixed chart width to responsive (#1670)

This commit is contained in:
JaePil Jung 2019-02-04 22:40:39 +09:00 committed by Ryan Dahl
parent cb95797e27
commit 66cea39067
3 changed files with 3 additions and 6 deletions

View file

@ -1,4 +1,4 @@
<!-- Copyright 2018 the Deno authors. All rights reserved. MIT license. --> <!-- Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -->
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>

View file

@ -135,11 +135,6 @@ function generate(
// @ts-ignore // @ts-ignore
c3.generate({ c3.generate({
bindto: id, bindto: id,
size: {
height: 300,
// @ts-ignore
width: window.chartWidth || 375 // TODO: do not use global variable
},
data: { data: {
columns, columns,
onclick onclick

View file

@ -13,6 +13,8 @@ main {
} }
svg { svg {
margin: 0px auto; margin: 0px auto;
width: 100%;
height: 300px;
} }
a { a {