2.21日版
This commit is contained in:
@@ -2,7 +2,7 @@ import * as echarts from "echarts";
|
||||
export default function getOptions(dataProps: number[],xData:string[], color: string[]) {
|
||||
if (dataProps.length === 0) return null;
|
||||
return {
|
||||
grid: { top: 40, right: 10, bottom: 10, left: 10, containLabel: true },
|
||||
grid: { top: 30, right: 10, bottom: 5, left: 10, containLabel: true },
|
||||
legend: {
|
||||
show: false,
|
||||
},
|
||||
@@ -11,8 +11,10 @@ export default function getOptions(dataProps: number[],xData:string[], color: st
|
||||
data: xData,
|
||||
axisLabel: {
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
fontSize: 10,
|
||||
interval: 0,
|
||||
rotate:20
|
||||
|
||||
},
|
||||
axisTick: { show: false },
|
||||
axisLine: {
|
||||
|
||||
@@ -2,13 +2,13 @@ export default function getOptions(chartData: any) {
|
||||
if (Object.keys(chartData).length === 0) {
|
||||
return null;
|
||||
}
|
||||
const colors = ["#1A99FF", "#FFB70C", "#C69DFF", "#50F4E3", "#E02094"];
|
||||
const colors = ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160","#D680FF","#FF6860"];
|
||||
return {
|
||||
color: colors,
|
||||
grid: { top: 38, right: 12, bottom: 5, left: 15, containLabel: true },
|
||||
grid: { top: 50, right: 12, bottom: 5, left: 15, containLabel: true },
|
||||
legend: {
|
||||
show: true,
|
||||
top: 10,
|
||||
top: 5,
|
||||
right: 10,
|
||||
padding: 0,
|
||||
itemWidth: 14,
|
||||
|
||||
@@ -6,16 +6,15 @@ export default function getOptions(tempData: any) {
|
||||
const colors = ["#1A99FF", "#50F4E3"];
|
||||
return {
|
||||
color: colors,
|
||||
grid: { top: 30, right: 12, bottom: 10, left: 10, containLabel: true },
|
||||
grid: { top: 30, right: 12, bottom: 10, left: 5, containLabel: true },
|
||||
legend: {
|
||||
show: true,
|
||||
icon: "roundRect",
|
||||
top: 10,
|
||||
right: 10,
|
||||
padding: 0,
|
||||
itemWidth: 10,
|
||||
itemWidth: 14,
|
||||
itemHeight: 10,
|
||||
itemGap: 3,
|
||||
itemGap: 8,
|
||||
height: 10,
|
||||
textStyle: {
|
||||
color: "#DFF1FE",
|
||||
|
||||
@@ -2,15 +2,14 @@ export default function getOptions(chartData: any) {
|
||||
if (Object.keys(chartData).length === 0) {
|
||||
return null;
|
||||
}
|
||||
const colors = ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160"];
|
||||
let sum = chartData.sumData;
|
||||
const colors = ["#2760FF", "#8167F6", "#5B9BFF", "#99D66C", "#FFD160","#D680FF","#FF6860"];
|
||||
return {
|
||||
color: colors,
|
||||
grid: { top: 48, right: 20, bottom: 5, left: 15, containLabel: true },
|
||||
grid: { top: 48, right: 20, bottom: 5, left: 10, containLabel: true },
|
||||
legend: {
|
||||
show: true,
|
||||
icon: "roundRect",
|
||||
top: 10,
|
||||
top: 5,
|
||||
right: 20,
|
||||
padding: 0,
|
||||
itemWidth: 10,
|
||||
@@ -71,58 +70,6 @@ export default function getOptions(chartData: any) {
|
||||
},
|
||||
className: "luoyang-chart-tooltip",
|
||||
},
|
||||
// Declare several bar series, each will be mapped
|
||||
// to a column of dataset.source by default.
|
||||
series:chartData.series
|
||||
// series: [
|
||||
// {
|
||||
// data: chartData.yData1,
|
||||
// type: "bar",
|
||||
// stack: "a",
|
||||
// name: "磨边后",
|
||||
// barWidth: 14,
|
||||
// label: {
|
||||
// show: true,
|
||||
// position: "right",
|
||||
// color: "inherit",
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// data: chartData.yData2,
|
||||
// type: "bar",
|
||||
// stack: "a",
|
||||
// name: "包装1",
|
||||
// label: {
|
||||
// show: true,
|
||||
// position: "right",
|
||||
// color: "inherit",
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// data: chartData.yData3,
|
||||
// type: "bar",
|
||||
// stack: "a",
|
||||
// name: "包装2",
|
||||
// label: {
|
||||
// show: true,
|
||||
// position: "right",
|
||||
// color: "inherit",
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// data: [0, 0, 0, 0, 0],
|
||||
// type: "bar",
|
||||
// stack: "a",
|
||||
// name: "",
|
||||
// label: {
|
||||
// show: true,
|
||||
// position: "top",
|
||||
// color: "#fff",
|
||||
// formatter: function (params: any) {
|
||||
// return sum[params.dataIndex];
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user