Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full width chart #12

Closed
FallenRiteMonk opened this issue Aug 23, 2018 · 5 comments
Closed

Full width chart #12

FallenRiteMonk opened this issue Aug 23, 2018 · 5 comments
Assignees
Labels
feature New feature or request

Comments

@FallenRiteMonk
Copy link

It would be great to be able to get the chart to the full width of its parent element.
Currently width only supports numbers (converted to px) but it would be nice if one could pass %.

@jrabek
Copy link

jrabek commented Aug 28, 2018

@FallenRiteMonk I did the following to get full width:

css:

.rtc-chart {
  width: 100%
}

html template:

   <google-chart class="rtc-chart" *ngFor="let c of s.charts"
        [title]="c.title"
        [type]="c.type"
        [data]="c.data"
        [columnNames]="c.columnNames"
        [options]="c.options"
        [width]="undefined"
        [height]="undefined"
      ></google-chart>

@FERNman
Copy link
Owner

FERNman commented Aug 29, 2018

Scan through the updated Readme to see how to create a full-width chart!

@hvent90
Copy link

hvent90 commented Jan 31, 2019

I had to look through the tests to see that I had to do <google-chart style="width: 100%" to get full width. Could this be added to the readme, pretty please? :) Thanks for the wonderful package.

@FERNman
Copy link
Owner

FERNman commented Feb 1, 2019

@hvent90 Good idea, will be added! 😃

@hvent90
Copy link

hvent90 commented Feb 1, 2019

Woohoo!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants