如何在laravel consoletvs图表V6.x中设置颜色?
$chart = new SampleChart;
$chart->displayAxes(false);
$chart->dataset('W1', 'pie', array('10','80','10'));
Run Code Online (Sandbox Code Playgroud)
-> colors()不起作用!认为它是旧版本。当前,所有值均为灰色。
我正在使用Chart.js为客户制作一个简单的折线图,但是显示的值都在数百万以上,这使得标签在图表中占据了大量空间,如下所示:
我想缩短标签以显示M而不是六个0。
我查看了文档,但没有发现任何此类信息。
我在Power BI中构建了一个条形图
除了X轴命名不可更改外,图表看起来还不错
我希望数据按照它们的方式排序,但每个栏的名称输入方式不同
目前X轴显示
April / May / June / July / etc.
Run Code Online (Sandbox Code Playgroud)
我希望它显示一个不同的标签示例
4-18 / 5-18 / 6-18 / 7-18 / etc
Run Code Online (Sandbox Code Playgroud)
我创建了一个计算列,并使用了我想要的命名
但是图表中的订单是错误的
我懂了
1-18 / 10-18 / 11-18 / 12-18 / 2-18 / 3-18 / etc.
Run Code Online (Sandbox Code Playgroud)
即使领先0我也得到了这个
01-17 / 01-18 / 02-17 / 02-18 / etc.
Run Code Online (Sandbox Code Playgroud)
有什么办法可以在不打扰其订单的情况下更改X轴标签吗?
我正在使用echarts,尝试使echarts在x轴上显示一天的时间段时遇到问题。这是我的代码
this.area = {
color: ["#009C95","#21ba45"],
title : {
text: 'Fuel History',
textStyle: {
fontFamily: 'lato'
}
},
tooltip : {
trigger: 'axis'
},
calculable : true,
xAxis : [
{
type: 'time',
boundaryGap:false,
axisLabel: {
formatter: (function(value){
return moment(value).format('HH:mm');
})
},
data : dates
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
backgroundColor: '#4D86FF',
name:'Refuelling',
type:'line',
smooth:true,
itemStyle: {normal: {areaStyle: {type: 'default'}}},
data: historyRefuelling
},
{
name:'Fuel Theft',
type:'line',
smooth:true,
itemStyle: {normal: …Run Code Online (Sandbox Code Playgroud) 我需要在我的项目中安装Laravel图表。安装后
composer require consoletvs/charts:6.*
Run Code Online (Sandbox Code Playgroud)
我有这个错误:
[RuntimeException]
Could not scan for classes inside "database/factories" which does not appear
to be a file nor a folder
Run Code Online (Sandbox Code Playgroud)
所以当我在App文件夹中复制我的提供和同盟之后,我得到了:
Class 'ConsoleTVs\Charts\ChartsServiceProvider' not found
Run Code Online (Sandbox Code Playgroud)
有人可以帮忙吗?
我的应用程序中有两个高图,一个是柱形图,另一个是饼图.在第一个柱形图中,我显示了多年来的汽车销售情况,并且在一年内向下钻取时显示销售额为几个季度.然后是一个单独的饼图,显示按地区划分的汽车销售情况.在向下钻取一个区域时,它显示所选区域中子区域的汽车销售.我想要的是同步这两个图表.例如,最初的柱形图显示了多年的销售额,饼图显示了区域内的销售额.当我点击一年时,它应向下钻取以按季度显示销售额,饼图也应该更新以按区域显示销售额,但仅在列图表中显示该选定年份.我尝试了几种方法,但无法得到解决方案.有没有解决这个问题.
以下是我使用的示例代码. https://jsfiddle.net/yasirunilan/erqm86k7/15/
// Create the chart
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Car Sales'
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Total percent Car Sales'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: '{point.y:.1f}%'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
},
"series": [
{
"name": "Years",
"colorByPoint": true,
"data": [
{
"name": "2015", …Run Code Online (Sandbox Code Playgroud) 我正在使用nivo饼图在React js中工作,我正在使用文档中提供的确切代码,但是当我启动服务器时,该图表未呈现,并且显示空白页面,并且控制台和服务器终端中没有错误。
码:
import React from 'react';
import { render } from 'react-dom'
import { ResponsivePie } from '@nivo/pie'
var data = [
{
"id": "rust",
"label": "rust",
"value": 576,
"color": "hsl(167, 70%, 50%)"
},
{
"id": "javascript",
"label": "javascript",
"value": 129,
"color": "hsl(119, 70%, 50%)"
},
{
"id": "java",
"label": "java",
"value": 422,
"color": "hsl(253, 70%, 50%)"
},
{
"id": "hack",
"label": "hack",
"value": 71,
"color": "hsl(307, 70%, 50%)"
},
{
"id": "erlang",
"label": "erlang",
"value": 354, …Run Code Online (Sandbox Code Playgroud) 我正在angular6项目中实施amcharts4 “ Animated-Gauge”演示。
这是我的代码:
在StackBlitz在线编辑器上运行良好,但是在我的angular6项目中实现时抛出错误。它在第25行抛出了错误警告,这是
var axis = chart.xAxes.push(new am4charts.ValueAxis());
Run Code Online (Sandbox Code Playgroud)
当我将鼠标悬停在第25行错误时,就会抛出此错误。
Argument of type 'ValueAxis<AxisRenderer> is not assignable to parameter'
of type Axis<AxisRendererCircular>
Run Code Online (Sandbox Code Playgroud)
这是我的错误图片:
我该如何解决这个问题?
我有一个来自Charts_flutter 0.5.0包的简单条形图,我想在另一个页面中调用它,或者我的目标是在其中添加更多的图,例如饼图和其他一些图。
Widget build(BuildContext context) {
List<Series> seriesList;
return Scaffold(
appBar: AppBar(
elevation: 0,
title: Text(
"Charts",
style: TextStyle(color: Colors.blueGrey),
textAlign: TextAlign.center,
),
backgroundColor: Colors.transparent,
iconTheme: IconThemeData(color: Colors.blueGrey),
),
body: ListView(
children: <Widget>[
SimpleBarChart(seriesList), //<-- I've added this line
],
),
);
}
Run Code Online (Sandbox Code Playgroud)
图表的代码是这样:在此处查找更多信息:https : //google.github.io/charts/flutter/gallery.html
/// Bar chart example
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:flutter/material.dart';
class SimpleBarChart extends StatelessWidget {
final List<charts.Series> seriesList;
final bool animate;
SimpleBarChart(this.seriesList, {this.animate});
/// Creates a [BarChart] with sample data and no transition. …Run Code Online (Sandbox Code Playgroud)