我正在使用ngx-admin,并且正在尝试使ngx-line-chart响应。
我的图表在nb卡中,当我调整窗口大小时,nb卡完全响应。因此,我希望调整图表大小以适合nb卡。
我的html代码:
<div style="margin: 100px auto auto">
<nb-card>
<nb-card-header>XXXXXXXXXX</nb-card-header>
<nb-card-body>
<ngx-line-chart></ngx-line-chart>
</nb-card-body>
</nb-card>
</div>
Run Code Online (Sandbox Code Playgroud)
我的组件:
import { Component } from '@angular/core';
@Component({
selector: 'ngx-line-chart',
template: `
<ngx-charts-line-chart
[scheme]="colorScheme"
[results]="multi"
[xAxis]="showXAxis"
[yAxis]="showYAxis"
[showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel"
[xAxisLabel]="xAxisLabel"
[yAxisLabel]="yAxisLabel">
</ngx-charts-line-chart>
`,
})
export class LineChartComponent {
showXAxis = true;
showYAxis = true;
showXAxisLabel = true;
xAxisLabel = 'Date';
showYAxisLabel = true;
yAxisLabel = 'Services effectués';
colorScheme = {
domain: ['blue'],
};
themeSubscription: any;
multi = [
{
name: 'Services effectués',
series: [
{ …
Run Code Online (Sandbox Code Playgroud) 我是flutter的新手,我创建了一个BottomNavigationBar并向其中添加了一些包含flutter图标的BottomNavigationBarItem。
问题是,当我选择我的底部导航栏的一项时,该项目会移动其他图标。
这是我的应用程序的屏幕截图:
有没有办法阻止这种转变?
我的代码:
import 'package:flutter/material.dart';
class Navbar extends StatefulWidget {
const Navbar({ Key key }) : super(key: key);
@override
_NavbarState createState() => _NavbarState();
}
class _NavbarState extends State<Navbar> {
int index = 0;
@override
Widget build(BuildContext context) {
return BottomNavigationBar(
iconSize: 30,
showSelectedLabels: false,
showUnselectedLabels: false,
selectedItemColor: Colors.blueGrey,
unselectedItemColor: Colors.black,
currentIndex: index,
onTap: (int selectedIndex) {
setState(() {
index = selectedIndex;
});
},
items: [
BottomNavigationBarItem(
icon: new Icon(
Icons.home,
),
title: new Text('Home'),
),
BottomNavigationBarItem(
icon: new …
Run Code Online (Sandbox Code Playgroud) 试图制作一些基本的刽子手代码来练习学习C,但我似乎无法改变程序中的个别角色
int main(int argc, char *argv[]) {
int length, a, x;
x = 0;
char gWord[100];
char word[100] = "horse";
length = strlen(word) - 1;
for(a = 0; a<= length; a = a + 1){
gWord[a] = "_";
printf("%s", gWord[a]);
}
printf("%s", gWord);
}
Run Code Online (Sandbox Code Playgroud)
当我尝试运行它时,它只是在每次循环时打印(null).这可能是一个基本的修复,但我是C的新手,在网上找不到任何关于它的东西
代码正在编译evan,虽然main的返回类型为int,它与返回类型字符串一起使用而没有错误,它背后的原因是什么.
#include <stdio.h>
int main()
{
int i=0;
printf("Hello World");
//if(i!=0)
return "hai";
return 0;
}
Run Code Online (Sandbox Code Playgroud) c ×2
angular ×1
arrays ×1
character ×1
charts ×1
flutter ×1
function ×1
ngx-admin ×1
ngx-charts ×1
responsive ×1