mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-20 17:30:14 +01:00
chart.js responsive error fix
This commit is contained in:
parent
0239c17766
commit
3f8e623584
4 changed files with 23 additions and 16 deletions
|
|
@ -35,8 +35,7 @@ export class ChartJs {
|
|||
public options = {
|
||||
scaleShowLabelBackdrop : false,
|
||||
segmentShowStroke : false,
|
||||
// TODO: produce an error
|
||||
// responsive: true,
|
||||
responsive: true,
|
||||
scaleFontColor: "rgba(255,255,255,.7)",
|
||||
scaleLineColor: "rgba(255,255,255,.7)",
|
||||
pointLabelFontColor: "rgba(255,255,255,.7)"
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<ba-card title="Pie" baCardClass="medium-card">
|
||||
<base-chart class="chart chart-pie"
|
||||
<ba-card title="Pie" baCardClass="with-scroll">
|
||||
<base-chart class="chartjs chart chart-pie"
|
||||
[legend]="true" [colours]="colours" [options]="options" [data]="data.one" [chartType]="chartType('Pie')" [labels]="labels.one" (chartClick)="changeData($event)">
|
||||
</base-chart>
|
||||
</ba-card>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<ba-card title="Doughnut" baCardClass="medium-card">
|
||||
<base-chart class="doughnut chart-doughnut"
|
||||
<ba-card title="Doughnut" baCardClass="with-scroll">
|
||||
<base-chart class="chartjs doughnut chart-doughnut"
|
||||
[legend]="true" [colours]="colours" [options]="options" [data]="data.one" [chartType]="chartType('Doughnut')" [labels]="labels.one" (chartClick)="changeData($event)">
|
||||
</base-chart>
|
||||
</ba-card>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<ba-card title="Polar" baCardClass="medium-card">
|
||||
<base-chart class="polar chart-polar"
|
||||
<ba-card title="Polar" baCardClass="with-scroll">
|
||||
<base-chart class="chartjs polar chart-polar"
|
||||
[legend]="true" [colours]="colours" [options]="options" [data]="data.one" [chartType]="chartType('PolarArea')" [labels]="labels.one" (chartClick)="changeData($event)">
|
||||
</base-chart>
|
||||
</ba-card>
|
||||
|
|
@ -27,14 +27,14 @@
|
|||
<div class="row ">
|
||||
<div class="col-md-6">
|
||||
<ba-card title="Animated Radar" baCardClass="with-scroll col-eq-height">
|
||||
<base-chart class="waveLine chart-waveLine"
|
||||
<base-chart class="chartjs waveLine chart-waveLine"
|
||||
[legend]="false" [colours]="colours" [options]="options" [data]="data.two" [chartType]="chartType('Radar')" [labels]="labels.two" (chartClick)="changeData($event)">
|
||||
</base-chart>
|
||||
</ba-card>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<ba-card title="Animated Bars" baCardClass="with-scroll col-eq-height">
|
||||
<base-chart class="waveBars chart-waveBars"
|
||||
<base-chart class="chartjs waveBars chart-waveBars"
|
||||
[legend]="false" [colours]="colours" [options]="options" [data]="data.two" [chartType]="chartType('Bar')" [labels]="labels.two" (chartClick)="changeData($event)">
|
||||
</base-chart>
|
||||
</ba-card>
|
||||
|
|
@ -44,21 +44,21 @@
|
|||
<div class="row ">
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<ba-card title="Radar" baCardClass="with-scroll">
|
||||
<base-chart id="radar" class="chart chart-radar"
|
||||
<base-chart id="radar" class="chartjs chart chart-radar"
|
||||
[legend]="false" [series]="series" [colours]="colours" [options]="options" [data]="data.three" [chartType]="chartType('Radar')" [labels]="labels.three" (chartClick)="changeData($event)">
|
||||
</base-chart>
|
||||
</ba-card>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-6">
|
||||
<ba-card title="Line" baCardClass="with-scroll">
|
||||
<base-chart id="line" class="chart chart-line"
|
||||
<base-chart id="line" class="chartjs chart chart-line"
|
||||
[legend]="false" [series]="series" [colours]="colours" [options]="options" [data]="data.three" [chartType]="chartType('Line')" [labels]="labels.two" (chartClick)="changeData($event)">
|
||||
</base-chart>
|
||||
</ba-card>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-12">
|
||||
<ba-card title="Bars" baCardClass="with-scroll">
|
||||
<base-chart id="bar" class="chart chart-bar"
|
||||
<base-chart id="bar" class="chartjs chart chart-bar"
|
||||
[legend]="false" [series]="series" [colours]="colours" [options]="options" [data]="data.three" [chartType]="chartType('Bar')" [labels]="labels.two" (chartClick)="changeData($event)">
|
||||
</base-chart>
|
||||
</ba-card>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
.chartjs {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chart-legend,
|
||||
.bar-legend,
|
||||
.line-legend,
|
||||
|
|
@ -16,6 +21,7 @@
|
|||
padding-left: 0;
|
||||
/* IE (handles all cases, really, but we should also include the vendor-specific properties just to be safe) */
|
||||
}
|
||||
|
||||
.chart-legend li,
|
||||
.bar-legend li,
|
||||
.line-legend li,
|
||||
|
|
@ -32,6 +38,7 @@
|
|||
font-size: smaller;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.chart-legend li span,
|
||||
.bar-legend li span,
|
||||
.line-legend li span,
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ $card-header-font-size: 16px;
|
|||
font-weight: $font-normal;
|
||||
text-transform: uppercase;
|
||||
opacity: 0.9;
|
||||
font-size: $card-header-font-size;
|
||||
//text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue