Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
481787a7
Commit
481787a7
authored
Jan 03, 2018
by
nikogu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed charts color style
parent
6404250d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
10 deletions
+32
-10
src/components/Charts/Bar/index.js
src/components/Charts/Bar/index.js
+17
-5
src/components/Charts/MiniArea/index.js
src/components/Charts/MiniArea/index.js
+1
-2
src/components/Charts/index.less
src/components/Charts/index.less
+1
-1
src/g2.js
src/g2.js
+12
-1
src/routes/Dashboard/Analysis.js
src/routes/Dashboard/Analysis.js
+1
-1
No files found.
src/components/Charts/Bar/index.js
View file @
481787a7
...
...
@@ -55,7 +55,14 @@ class Bar extends Component {
};
render
()
{
const
{
height
,
title
,
forceFit
=
true
,
data
,
color
=
'
rgba(24, 144, 255, 0.85)
'
,
padding
}
=
this
.
props
;
const
{
height
,
title
,
forceFit
=
true
,
data
,
color
=
'
rgba(24, 144, 255, 0.85)
'
,
padding
,
}
=
this
.
props
;
const
{
autoHideXLabels
}
=
this
.
state
;
...
...
@@ -79,16 +86,21 @@ class Bar extends Component {
return
(
<
div
className
=
{
styles
.
chart
}
style
=
{{
height
}}
ref
=
{
this
.
handleRoot
}
>
<
div
ref
=
{
this
.
handleRef
}
>
{
title
&&
<
h4
>
{
title
}
<
/h4>
}
{
title
&&
<
h4
style
=
{{
marginBottom
:
20
}}
>
{
title
}
<
/h4>
}
<
Chart
scale
=
{
scale
}
height
=
{
height
}
height
=
{
title
?
height
-
41
:
height
}
forceFit
=
{
forceFit
}
data
=
{
data
}
padding
=
{
padding
||
'
auto
'
}
>
<
Axis
name
=
"
x
"
title
=
{
false
}
label
=
{
!
autoHideXLabels
}
tickLine
=
{
!
autoHideXLabels
}
/
>
<
Axis
name
=
"
y
"
title
=
{
false
}
line
=
{
false
}
tickLine
=
{
false
}
min
=
{
0
}
/
>
<
Axis
name
=
"
x
"
title
=
{
false
}
label
=
{
autoHideXLabels
?
false
:
{}}
tickLine
=
{
autoHideXLabels
?
false
:
{}}
/
>
<
Axis
name
=
"
y
"
min
=
{
0
}
/
>
<
Tooltip
showTitle
=
{
false
}
crosshairs
=
{
false
}
/
>
<
Geom
type
=
"
interval
"
position
=
"
x*y
"
color
=
{
color
}
tooltip
=
{
tooltip
}
/
>
<
/Chart
>
...
...
src/components/Charts/MiniArea/index.js
View file @
481787a7
...
...
@@ -11,6 +11,7 @@ export default class MiniArea extends React.Component {
data
=
[],
forceFit
=
true
,
color
=
'
rgba(24, 144, 255, 0.2)
'
,
borderColor
=
'
#1089ff
'
,
scale
=
{},
borderWidth
=
2
,
line
,
...
...
@@ -19,8 +20,6 @@ export default class MiniArea extends React.Component {
animate
=
true
,
}
=
this
.
props
;
const
borderColor
=
this
.
props
.
borderColor
||
color
;
const
padding
=
[
36
,
5
,
30
,
5
];
const
scaleProps
=
{
...
...
src/components/Charts/index.less
View file @
481787a7
...
...
@@ -3,7 +3,7 @@
width: 100%;
.chartContent {
position: absolute;
bottom: -
34
px;
bottom: -
28
px;
width: 100%;
> div {
margin: 0 -5px;
...
...
src/g2.js
View file @
481787a7
// 全局 G2 设置
import
{
track
}
from
'
bizcharts
'
;
import
{
track
,
setTheme
}
from
'
bizcharts
'
;
track
(
false
);
const
config
=
{
defaultColor
:
'
#1089ff
'
,
shape
:
{
interval
:
{
fillOpacity
:
1
,
},
},
};
setTheme
(
config
);
src/routes/Dashboard/Analysis.js
View file @
481787a7
...
...
@@ -330,7 +330,7 @@ export default class Analysis extends Component {
<
Row
>
<
Col
xl
=
{
16
}
lg
=
{
12
}
md
=
{
12
}
sm
=
{
24
}
xs
=
{
24
}
>
<
div
className
=
{
styles
.
salesBar
}
>
<
Bar
height
=
{
2
70
}
title
=
"
销售额趋势
"
data
=
{
salesData
}
/
>
<
Bar
height
=
{
2
95
}
title
=
"
销售额趋势
"
data
=
{
salesData
}
/
>
<
/div
>
<
/Col
>
<
Col
xl
=
{
8
}
lg
=
{
12
}
md
=
{
12
}
sm
=
{
24
}
xs
=
{
24
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment