Skip to content

Commit

Permalink
Merge pull request #12 from Cuiyansong/master
Browse files Browse the repository at this point in the history
refactor: change color and gap
  • Loading branch information
scottsut authored Oct 15, 2021
2 parents 5e05835 + 4a8d301 commit 3e14c18
Show file tree
Hide file tree
Showing 32 changed files with 132 additions and 37,823 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ function DemoCustomLineChart({ dHelper }) {
meta: {
id: 'demo-custom-line-chart',
name: '[DEMO]用户自定义折线图',
icon: 'star',
icon: 'chart',
requirements: [
{
group: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class BasicAreaChart extends Chart {
option = {
xAxis: {
type: 'category',
boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
},
yAxis: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ class BasicBarChart extends Chart {
const xAxisColumns = (groupConfigs || []).map(config => {
return {
type: 'category',
boundaryGap: false,
tooltip: { show: true },
data: UniqArray(dataColumns.map(dc => dc[getValueByColumnKey(config)])),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const config: ChartConfig = {
label: 'common.fontColor',
key: 'fontColor',
comType: 'fontColor',
default: 'black',
default: '#495057',
watcher: {
deps: ['enableTotal'],
action: props => {
Expand Down Expand Up @@ -133,7 +133,7 @@ const config: ChartConfig = {
default: {
type: 'solid',
width: 0,
color: 'black',
color: '#ced4da',
},
},
{
Expand All @@ -144,7 +144,7 @@ const config: ChartConfig = {
{
label: 'bar.width',
key: 'width',
default: 10,
default: 0,
comType: 'inputNumber',
},
{
Expand Down Expand Up @@ -197,7 +197,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down Expand Up @@ -254,7 +254,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down Expand Up @@ -282,7 +282,7 @@ const config: ChartConfig = {
default: {
type: 'solid',
width: 1,
color: 'black',
color: '#ced4da',
},
},
{
Expand All @@ -300,7 +300,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
{
Expand Down Expand Up @@ -347,7 +347,7 @@ const config: ChartConfig = {
default: {
type: 'solid',
width: 1,
color: 'black',
color: '#ced4da',
},
},
{
Expand All @@ -365,7 +365,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
{
Expand All @@ -383,7 +383,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
{
Expand Down Expand Up @@ -441,7 +441,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'grey',
color: '#ced4da',
},
},
{
Expand All @@ -457,7 +457,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'grey',
color: '#ced4da',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ class BasicDoubleYChart extends Chart {

return {
type: 'category',
boundaryGap: false,
tooltip: { show: true },
inverse,
axisLabel: getAxisLabel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down Expand Up @@ -168,8 +168,8 @@ const config: ChartConfig = {
comType: 'line',
default: {
type: 'solid',
width: 1,
color: 'black',
width: 0,
color: null,
},
},
{
Expand All @@ -188,7 +188,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down Expand Up @@ -217,7 +217,7 @@ const config: ChartConfig = {
default: {
type: 'solid',
width: 1,
color: 'black',
color: null,
},
},
{
Expand All @@ -236,7 +236,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down Expand Up @@ -264,7 +264,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'grey',
color: '#ced4da',
},
},
{
Expand All @@ -283,7 +283,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
{
Expand Down Expand Up @@ -324,7 +324,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'grey',
color: '#ced4da',
},
},
{
Expand All @@ -340,7 +340,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'grey',
color: '#ced4da',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
{
Expand Down Expand Up @@ -206,7 +206,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ class BasicLineChart extends Chart {
const xAxisColumns = groupConfigs.map(config => {
return {
type: 'category',
boundaryGap: false,
tooltip: { show: true },
data: dataColumns.map(dc => dc[getValueByColumnKey(config)]),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down Expand Up @@ -171,7 +171,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down Expand Up @@ -199,7 +199,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'black',
color: '#ced4da',
},
},
{
Expand All @@ -218,7 +218,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
{
Expand Down Expand Up @@ -265,7 +265,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'black',
color: '#ced4da',
},
},
{
Expand All @@ -284,7 +284,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
{
Expand All @@ -303,7 +303,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
{
Expand Down Expand Up @@ -361,7 +361,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'grey',
color: '#ced4da',
},
},
{
Expand All @@ -377,7 +377,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: 'grey',
color: '#ced4da',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ class BasicOutlineMapChart extends Chart {

const inRange = {
color: [
aggregateConfigs?.[0]?.color?.start || '#121122',
aggregateConfigs?.[0]?.color?.end || 'rgba(3,4,5,0.4)',
aggregateConfigs?.[0]?.color?.start || '#1B9AEE',
aggregateConfigs?.[0]?.color?.end || '#FA8C15',
],
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const config: ChartConfig = {
{
label: 'map.areaColor',
key: 'areaColor',
default: '#eee',
default: '#e9ecef',
comType: 'fontColor',
},
{
Expand All @@ -89,7 +89,7 @@ const config: ChartConfig = {
{
label: 'map.areaEmphasisColor',
key: 'areaEmphasisColor',
default: '#eee',
default: '#dee2e6',
comType: 'fontColor',
},
{
Expand All @@ -99,7 +99,7 @@ const config: ChartConfig = {
default: {
type: 'dashed',
width: 1,
color: '#000',
color: '#ced4da',
},
},
],
Expand Down Expand Up @@ -147,7 +147,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down Expand Up @@ -211,7 +211,7 @@ const config: ChartConfig = {
fontSize: '12',
fontWeight: 'normal',
fontStyle: 'normal',
color: 'black',
color: '#495057',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class BasicPieChart extends Chart {
return {
name: getColumnRenderName(config),
type: 'category',
boundaryGap: false,
tooltip: { show: true },
data: UniqArray(dataColumns.map(dc => dc[getValueByColumnKey(config)])),
};
Expand Down
Loading

0 comments on commit 3e14c18

Please sign in to comment.