fix(demo): refactor js theme using

This commit is contained in:
KostyaDanovsky 2017-08-01 15:42:06 +03:00
parent 672615b710
commit b772882cd6
28 changed files with 561 additions and 492 deletions

View file

@ -26,17 +26,26 @@ export class ChartjsPieComponent {
constructor(private theme: NgaThemeService) {
this.theme.getJsTheme().subscribe(config => {
const chartjs: any = config.variables.chartjs;
this.chartOptions = {
responsive: true,
scale: {
pointLabels: {
fontSize: 14,
fontColor: chartjs.legendTextColor,
},
},
scales: {
xAxes: [
{
gridLines: {
display: true,
color: config.chartjsPieXAxisColor,
color: chartjs.xAxisColor,
},
ticks: {
fontColor: config.chartjsPitTickColor,
fontColor: chartjs.tickColor,
},
},
],
@ -44,17 +53,17 @@ export class ChartjsPieComponent {
{
gridLines: {
display: true,
color: config.chartjsPieYAxisColor,
color: chartjs.yAxisColor,
},
ticks: {
fontColor: config.chartjsPieTickColor,
fontColor: chartjs.tickColor,
},
},
],
},
legend: {
labels: {
fontColor: config.chartjsPieLegendTextColor,
fontColor: chartjs.legendTextColor,
},
},
};