Skip to content

Commit 600dd31

Browse files
Mariela TihovaMariela Tihova
authored andcommitted
Additional changed on charts to resolve previous UX comments
1 parent ca622c1 commit 600dd31

15 files changed

Lines changed: 56 additions & 20 deletions

File tree

projects/charts/bar-chart/src/app/app.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$font-family: $fluent-typeface,
66
$type-scale: $fluent-type-scale
77
);
8-
@include theme($palette: $light-fluent-palette, $schema: $light-fluent-schema);
8+
@include theme($palette: $light-material-palette, $schema: $light-material-schema);
99

1010
html,
1111
body {

projects/charts/bar-chart/src/app/bar-chart-sample/bar-chart-sample.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
igx-data-chart {
1111
height: 100%;
1212
}
13+
14+
.legend-title {
15+
margin-left: 13px;
16+
}

projects/charts/column-chart/src/app/app.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@include core();
44
@include typography();
5-
@include theme($light-material-palette);
5+
@include theme($palette: $light-material-palette, $schema: $light-material-schema);
66

77
html,
88
body {

projects/charts/column-chart/src/app/column-chart-sample/column-chart-sample.component.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
@defer {
1+
<div class="container">
2+
<div class="legend-title">Highest Grossing Movie Franchises</div>
3+
<div class="legend">
4+
<igx-legend name="legend" #legend orientation="Horizontal"> </igx-legend>
5+
</div>
26
<igx-category-chart
37
name="chart"
48
#chart
59
width="100%"
610
height="100%"
11+
[legend]="legend"
712
[dataSource]="chartData"
813
chartType="column"
914
yAxisTitle="Temperature in °C"
@@ -16,4 +21,5 @@
1621
[isVerticalZoomEnabled]="false"
1722
>
1823
</igx-category-chart>
19-
}
24+
</div>
25+
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
:host {
22
display: block;
3-
height: 100%;
43
width: 100%;
4+
height: 100%;
55
padding: 35px 16px 75px 16px;
6+
}
7+
8+
.container,
9+
.chart-wrapper,
10+
igx-category-chart {
11+
height: 100%;
12+
}
13+
14+
.legend-title {
15+
margin-left: 13px;
616
}

projects/charts/column-chart/src/app/column-chart-sample/column-chart-sample.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { THEME_TOKEN, ThemeToken } from 'igniteui-angular';
4-
import { IgxCategoryChartModule } from 'igniteui-angular-charts';
4+
import { IgxCategoryChartModule, IgxLegendModule } from 'igniteui-angular-charts';
55

66
@Component({
77
selector: 'app-column-chart-sample',
@@ -16,6 +16,7 @@ import { IgxCategoryChartModule } from 'igniteui-angular-charts';
1616
],
1717
imports: [
1818
CommonModule,
19+
IgxLegendModule,
1920
IgxCategoryChartModule
2021
],
2122
schemas: [CUSTOM_ELEMENTS_SCHEMA],

projects/charts/line-chart/src/app/app.component.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
$font-family: $bootstrap-typeface,
66
$type-scale: $bootstrap-type-scale
77
);
8-
@include theme(
9-
$palette: $light-bootstrap-palette,
10-
$schema: $light-bootstrap-schema
11-
);
8+
9+
@include theme($palette: $light-material-palette, $schema: $light-material-schema);
1210

1311
html,
1412
body {

projects/charts/line-chart/src/app/line-chart-sample/line-chart-sample.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
igx-category-chart {
1111
height: 100%;
1212
}
13+
14+
.legend-title {
15+
margin-left: 13px;
16+
}

projects/charts/pie-chart/src/app/app.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@include core();
44
@include typography($font-family: $indigo-typeface, $type-scale: $indigo-type-scale);
5-
@include indigo-light-theme($light-indigo-palette);
5+
@include theme($palette: $light-material-palette, $schema: $light-material-schema);
66

77
html,
88
body {

projects/charts/pie-chart/src/app/pie-chart-sample/pie-chart-sample.component.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525

2626
<div class="chart-wrapper">
2727
<div class="pie-chart-variant">PIE CHART EXPLOSION</div>
28+
<div class="legend-title">Global Electricity Demand by Energy Use</div>
29+
<div class="legend">
30+
<igx-item-legend name="legend2" #legend2 orientation="Horizontal">
31+
</igx-item-legend>
32+
</div>
2833
<div class="chart2">
2934
<igx-pie-chart
3035
#chart2
@@ -36,6 +41,7 @@
3641
labelsPosition="OutsideEnd"
3742
labelExtent="30"
3843
explodedSlices="3"
44+
[legend]="legend2"
3945
>
4046
</igx-pie-chart>
4147
</div>

0 commit comments

Comments
 (0)