scatter plot - styles

3Overview

SCATTER PLOT 의 전반적인 스타일에 대한 값을 정의

stylesMidnighttruejs
var defaultStyles = {
	layout : {
		area : {
			color : '#f8f8f8'
		},
		line : {
			color : '#eaeaea',
			width : 1
		},
		paddingTop : 43,
		paddingBottom : 24,
		paddingLeft : 20,
		paddingRight : 30
	},
	graph : {
		paddingTop: 20,
		paddingBottom: 0,
		paddingLeft: 20,
		paddingRight: 20,
		area : {
			color: '#f8f8f8'
		},
		line: {
			top: { 
				color: '#ccc9c9', 
				width: 1, 
				opacity: 1 
			},
			left: { 
				color: '#ccc9c9', 
				width: 1, 
				opacity: 1 
			},
			right: { 
				color: '#ccc9c9', 
				width: 1, 
				opacity: 1 
			},
			bottom: { 
				color: '#ccc9c9', 
				width: 1, 
				opacity: 1 
			}
		}		            
	},
	yAxis: {
		width: 44, 
		position: 'left',
		paddingLeft: 0, 
		paddingRight: 11,
		line: {
			color: '#cccccc', 
			width: 1, 
			opacity: 1,			
			underLine : {
				use : false,
				color: '#3e4150', 
				width: 1, 
				opacity: 1
			}
		},
		text: {
			family: 'Nanum Gothic', 
			size: 12, 
			color: '#666666', 
			align: 'right',		/* left | center | right */
			style: 'normal', 	/* normal | italic */
			weight: 'bold',	/* normal | bold */
			opacity: 1
		},
		tick: {
			use : false,
			length: 5, 
			color: '#807f7f',
			width: 1, 
			opacity: 1,
			position: 'out'	/* out|in */
		}
	},
	xAxis: {
		height: 10, 
		paddingTop: 10, 
		line: { 
			color: '#e3e3e3', 
			width: 1, 
			opacity: 1,			
			underLine : {
				use : false,
				color: '#3e4150', 
				width: 1, 
				opacity: 1
			}
		},
		text: {
			family: 'Nanum Gothic',
			size: 12, 
			color: '#666666', 
			align: 'center',	/* left | center | right */
			style: 'normal',	/* normal | italic */
			weight: 'bold',	/* normal | bold */
			opacity: 1
		}
	},
	trendLine : {
		use : true,
		color : '#556673',
		width : 1,
		opacity : 1,
		animate : {
			use : true,
			color : '#ca873f'
		}
	},
	series : {
		line: {
			color: '#fff', 
			width: 0
		},
		area : {
			type : 'normal',	/* normal | upDown */
			color : [
				'#ff625f', '#ff852c', '#ffbb16', '#d6de1d', '#2bcdba',
				'#34b8ef', '#5e93f4', '#838bf0', '#cc8af2', '#ff8bcd'
			],		            	
			opacity: 1,
			size : {
				max : 25,
				min : 1
			}
		},
		hover : {
			use : true,
			area : {
				color : '#18918d'
			},
			line : {
				color : '#fff',
				width : 0
			}
		}
	},
	animate : {
		use : true,
		type : 'bounce', /* linear|>|<|<>|bounce|elastic|backln|backOut */
		speed : 600				     	
	},
	drag : { /* 모바일에서는 드래그 기능을 지원하지 않습니다. */
		use : false,
		down : {
			animate : {
				use : false,
				type : 'linear', /* linear|>|<|<>|bounce|elastic|backln|backOut */
				opacity : 0.5,
				speed : 100
			}
		},
		up :{
			animate : {
				use : false,
				type : 'linear', /* linear|>|<|<>|bounce|elastic|backln|backOut */
				speed : 200
			}
		}
	},
	enlarge : {
		use : false,
		animate : {
			use : false,
			type : 'linear', /* linear|>|<|<>|bounce|elastic|backln|backOut */
			speed : 400	
		}
	}
};	

Configuration Styles

layout

SVG 전체 영역 스타일

Parameters

   defalulttype설명
layout


paddingTop 43number

SVG 전체 영역의 상단 여백

paddingBottom 24number

SVG 전체 영역의 하단 여백

paddingLeft 20numberSVG 전체 영역의 좌측 여백
paddingRight 30numberSVG 전체 영역의 우측 여백
areacolor'#f8f8f8'stringSVG 전체 영역의 배경 색상
linecolor'#eaeaea'stringSVG 전체 영역의 테두리 색상
width1numberSVG 전체 영역의 테두리 두께

Usage

layoutMidnighttruejs
var styles = {
	layout: {
		area : {
			color : '#f8f8f8'
		},
		line : {
			color : '#eaeaea',
			width : 1
		},
		paddingTop : 30,
		paddingBottom : 30,
		paddingLeft : 30,
		paddingRight : 30
	}
}

Demo

Publisher Go 

graph

graph.padding-

Scatter Plot 이 그려지는 영역의 여백

Parameters

  defalulttype설명
graph


paddingTop20number

graph 의 상단 여백

paddingBottom0number

graph 의 하단 여백

paddingLeft20numbergraph 의 좌측 여백
paddingRight20numbergraph 의 우측 여백

Usage

graphMidnighttruejs
var styles = {
	graph: {
		paddingTop : 10,
		paddingBottom : 10,
		paddingLeft : 10,
		paddingRight : 10
	}
}

Demo

Publisher Go

graph.area

graph 의 area 영역에 대한 스타일 정의

Parameters

   defaulttype설명
graphareacolor'#f8f8f8'stringgraph 의 배경 색상

Usage

graph.areaMidnighttruejs
var styles = {
	graph: {
		area: {
			color : '#fff'
		}
	}
}

Demo

Publisher Go

graph.line

Scatter Plot 이 그려지는 영역의 테두리 설정(상, 하, 좌, 우 각각 따로 지정)

Parameters

    defaulttype설명
graph










line










top

color'#ccc9c9'string상단 선 색상 (영문컬러명이나 RGB값 입력)
width1number상단 선 두께 (0 ~ )
opacity1number상단 선 투명도 (0 ~ 1)
left

color'#ccc9c9'string좌측 선 색상 (영문컬러명이나 RGB값 입력)
width1number좌측 선 두께 (0 ~ )
opacity1number좌측 선 투명도 (0 ~ 1)
right

color'#ccc9c9'string우측 선 색상 (영문컬러명이나 RGB값 입력)
width1number우측 선 두께 (0 ~ )
opacity1number우측 선 투명도 (0 ~ 1)
bottom

color'#ccc9c9'string하단 선 색상 (영문컬러명이나 RGB값 입력)
width1number하단 선 두께 (0 ~ )
opacity1number하단 선 투명도 (0 ~ 1)

Usage

graph.lineMidnighttruejs
var styles = {
	graph: {
		line: {
			top : {
				color : '#ccc9c9',
				width : 1,
				opacity : 1
			},
			bottom : {
				color : '#ccc9c9',
				width : 1,
				opacity : 1

			},
			left : {
				color : '#ccc9c9',
				width : 1,
				opacity : 1

			},
			right : {
				color : '#ccc9c9',
				width : 1,
				opacity : 1

			}
		}
	}
}

Demo

Publisher Go

yAxis

yAxis.width

Y 축 텍스트가 출력되는 영역의 넓이

Parameters

  defaulttype설명
yAxiswidth44numberY축 label의 넓이

Usage

yAxis.widthMidnighttruejs
var styles = {
	yAxis: {
		width : 60
	}
}

Demo

Publisher Go

yAxis.position

graph 를 기준으로 한 Y 축의 위치

Parameters 

  defaulttype설명
yAxisposition'left'stringgraph 를 기준으로 한 Y 축의 위치 ( 'left' or 'right' )

Usage

yAxis.positionMidnighttruejs
var styles = {
	yAxis: {
		position: 'left'
	}
}

Demo

Publisher Go

yAxis.padding-

Y축 label의 위치

Parameters

  defaulttype설명
yAxispaddingLeft0numberY축 label 영역의 좌측 여백
paddingRight11numberY축 label 영역의 우측 여백

Usage

yAxis.padding-Midnighttruejs
var styles = {
	yAxis: {
		paddingLeft: 0,
		paddingRight: 20
	}
}

Demo

Publisher Go

yAxis.line 

Y 축 Line 스타일 정의

Parameters 

    defaulttype설명
yAxislinecolor '#cccccc'stringY축 선 색상 (영문컬러명이나 RGB값 입력)
width 1numberY축 선 두께 (0 ~ )
opacity 1numberY축 선 투명도 (0~1)
underLineusefalsebooleanY축 선의 이중 선 사용 여부 ( 'true' or 'false' )
color'#3e4150'stringY축 선의 이중 선 색상 (영문컬러명이나 RGB값 입력)
width1numberY축 의 이중 선 두께 (0 ~ )
opacity1numberY축 의 이중 선 투명도 (0~1)

Usage

yAxis.lineMidnighttruejs
var styles = {
	yAxis: {
		line : {
			color: '#bab9ba',            
			width: 1,
            opacity: 1,
            underLine : {
                use : true,
                color: '#3e4150',
                width: 1,
                opacity: 1
            }
		}
	}
}

Usage

Demo

Publisher Go

yAxis.text

Y 축의 text 영역

Parameters  

   defaulttype설명
yAxistextfamily'Nanum Gothic'string글꼴 종류 이름 ( 영문명 )
size12number글꼴 크기 ( px 단위 )
color'#666666'string글꼴 색상 ( 영문 색상명 혹은 RGB값 )
align'right'stringlabel width 내에서의 텍스트 위치 ( 'left' or 'right' or 'center' )
style'normal'string글꼴 모양 ( 'normal' or 'italic')
weight'bold'string글꼴 두께 ( 'normal' or 'bold' )
opacity1number글꼴 투명도 ( 0 ~ 1 )

Usage

yAxis.textMidnighttruejs
var styles = {
	yAxis: {
		text : {
			family : 'dotum',
			size : 11, 
			color : '#000',
			align : 'center',		/* [ left or center or right ] */
			style : 'normal',		/* [ normal or italic ] */
			weight : 'normal',		/* [ normal or bold ] */
			opacity : 1
		}
	}
}

Demo

Publisher Go

yAxis.tick

Y 축의 tick 스타일 정의

Parameters

   defaulttype설명
yAxistickuse'false'booleantick 사용 여부 ( 'true' or 'false' )
length5numbertick 길이
color'#807f7f'stringtick 색상 ( 영문 색상명 혹은 RGB값 )
width1numbertick 의 두께 ( 0 ~ )
opacity1numbertick 의 투명도 ( 0 ~ 1 )
position'in'stringtick 의 위치 ( 'in' or 'out' , 그래프 내부에 tick 이 위치할 경우 'in', 외부에 위치할 경우 'out' )

Usage

yAxis.tickMidnighttruejs
var styles = {
	yAxis: {
		tick: {
			use : false,
			length : 5, 
			color : '#000',
			width : 1,
			opacity : 1,
			position : 'out'	[ 'in' or 'out' ]
		}
	}
}

Demo

Publisher Go

xAxis

xAxis.height

X 축 label 영역의 높이

Parameters

  defaulttype설명
xAxisheight10number

X축 label의 높이

Usage

xAxis.heightMidnighttruejs
var styles = {
	xAxis: {
		height : 10
	}
}

Demo

Publisher Go

xAxis.paddingTop

X 축 label 영역의 padding-top 

Parameters 

  defaulttype설명
xAxispaddingTop15numberX축 label 영역의 상단 여백

Usage

xAxis.padddingTopMidnighttruejs
var styles = {
	xAxis: {
		paddingTop: 20
	}
}

Demo

Publisher Go

xAxis.line 

X 축 선 스타일 정의

Parameters 

    defaulttype설명
xAxislinecolor '#e3e3e3'stringX축 선 색상 (영문컬러명이나 RGB값 입력)
width 1numberX축 선 두께 (0 ~ )
opacity 1numberX축 선 투명도 (0~1)
underLineusefalsebooleanX축 선의 이중 선 사용 여부 ( 'true' or 'false' )
color'#3e4150'stringX축 선의 이중 선 색상 (영문컬러명이나 RGB값 입력)
width1numberX축 선의 이중 선 두께 (0 ~ )
opacity1numberX축 선의 이중 선 투명도 (0~1)

Usage

xAxis.lineMidnighttruejs
var styles = {
	xAxis: {
		line : {
			color: '#bab9ba',            
			width: 1,
            opacity: 1,
            underLine : {
                use : true,
                color: '#3e4150',
                width: 1,
                opacity: 1
            }
		}
	}
}

Demo

Publisher Go

xAxis.text

X 축의 text 영역

Parameters  

   defaulttype설명
xAxistextfamily'Nanum Gothic'string글꼴 종류 이름 ( 영문명 )
size12number글꼴 크기 ( px 단위 )
color'#666666'string글꼴 색상 ( 영문 색상명 혹은 RGB값 )
align'center'stringlabel width 내에서의 텍스트 위치 ( 'left' or 'right' or 'center' )
style'normal'string글꼴 모양 ( 'normal' or 'italic')
weight'bold'string글꼴 두께 ( 'normal' or 'bold' )
opacity1number글꼴 투명도 ( 0 ~ 1 )

Usage

xAxis.textMidnighttruejs
var styles = {
	yAxis: {
		text : {
			family : 'dotum',
			size : 11, 
			color : '#000',
			align : 'center',		/* [ left or center or right ] */
			style : 'normal',		/* [ normal or italic ] */
			weight : 'normal',		/* [ normal or bold ] */
			opacity : 1
		}
	}
}

Demo

Publisher Go

trendLine

추세선의 스타일 정의

Parameters  

   defaulttype설명
trendLineuse trueboolean추세선의 사용 여부 ( 'true' or 'false' )
color '#556673'string추세선 색상 (영문컬러명이나 RGB값 입력)
width 1number추세선 두께 (0 ~ )
opacity 1number추세선 투명도 (0 ~ 1)
animateusetrueboolean추세선의 애니메이션 사용 여부 ( 'true' or 'false' )
color'#ca873f'string추세선의 애니메이션 사용시 변경되는 색상 (영문컬러명이나 RGB값 입력)

Usage

trendLineMidnighttruejs
var styles = {
	trendLine: {
		use : true,
		color : '#ff0000',
		width : 1,
		opacity : 1,
		animate : {
			use : true,
			color : '#ffff00'
		}
	}
}

Demo

Publisher Go

series

series.line

plot 의 line 스타일 지정

Parameters  

   defaulttype설명
serieslinecolor'#fff'stringPlot 의 선 색상 (영문컬러명이나 RGB값 입력)
width0numberPlot 의 선 두께 (0 ~ )

Usage

series.lineMidnighttruejs
var styles = {
	series: {
		line : {
			color : '#ff0000',
			width : 1
		}
	}
}

Demo

Publisher Go

series.area .type = 'normal'

series 의 area 타입이 'normal' 일 때의 스타일 정의

Parameters  

    defaulttype설명
series



 





area



 
type 'normal'stringseries 의 타입이 'normal' 일 때 ( 'normal' or 'upDown' )
color 

[

'#ff625f', '#ff852c', '#ffbb16', '#d6de1d',

'#2bcdba', '#34b8ef', '#5e93f4',

'#838bf0','#cc8af2', '#ff8bcd'

]

arrayseries 의 색상 (영문컬러명이나 RGB값 입력)
opacity 1numberseries 투명도 (0 ~ 1)
size max25number

SVG element 의 높이와 넓이 중 작은 값을 기준으로 한 퍼센트 값으로 series 중 가장 큰 plot 의 지름에 적용 된다. ( 0 ~ )

  • size.max 가 25 일때, SVG element 의 넓이가 200px 이고 높이가 100px 이라면 가장 큰 plot 의 지름은 100px 의 25% 인 25px 이 적용된다.
min1number

SVG element 의 높이와 넓이 중 작은 값을 기준으로 한 퍼센트 값으로 series 중 가장 작은 plot 의 지름에 적용 된다. ( 0 ~ )

  • size.min 이 1 일때, SVG element 의 넓이가 200px 이고 높이가 100px 이라면 가장 작은 plot 의 지름은 100px 의 1% 인 1px 이 적용된다.
hover


use truebooleanseries 의 hover 이벤트 사용 여부 ( 'true' or 'false' )
areacolor'#18918d'stringmouse over 상태인 plot 의 면 색상(영문컬러명이나 RGB값 입력)
linecolor'#fff'stringmouse over 상태인 plot 의 선 색상(영문컬러명이나 RGB값 입력)
width0numbermouse over 상태인 plot 의 선 두께 ( 0 ~ )

Usage 

series.areaMidnighttruejs
var styles = {
	series : {
		area : {
			type : 'normal',
			color : [
				'#eb2207', '#ebad07', '#ebe807', '#98eb07', '#2deb07', 
                '#07eba3', '#07e3eb', '#0768eb', '#3807eb', '#bd07eb'
			},
			opacity : 1,
			size : {
				max : 25,
				min : 1
			}
		},
		hover : {
			use : true,
			area : {
				color : '#ff0000',
			},
			line : {
				color : '#fff',
				width : 1
			}
		}
	}
}
 Demo 

Publisher Go

series.area.type = 'upDown' 

series 의 area 타입이 'upDown' 일 때의 스타일 정의

Parameters 

     valuetype설명
series

areatype  'upDown'stringseries 의 타입이 upDown 일 때 ( 'normal' or 'upDown' )
upcolor 

'red'

stringseries 의 타입이 'up' 일 때 색상 (영문컬러명이나 RGB값 입력)
opacity 1numberseries 의 타입이 'up' 일 때 투명도 (0 ~ 1)
downcolor 

'blue'

stringseries 타입이 'down' 일 때 색상 (영문컬러명이나 RGB값 입력)
opacity 1numberseries 타입이 'down' 일 때 투명도 (0 ~ 1)
sizemax 200numberseries 중 가장 큰 plot 의 size
min 5numberseries 중 가장 작은 plot 의 size
hover

use  'true'booleanseries 의 hover 이벤트 사용 여부 ( 'true' or 'false' )
 area up  color '#ca2a27'stringmouse over 상태인 plot 의 type 이 'up' 일 경우의 면 색상(영문컬러명이나 RGB값 입력)
downcolor '#005fa8'stringmouse over 상태인 plot 의 type 이 'down' 일 경우의 면 색상(영문컬러명이나 RGB값 입력)

Usage

seriesMidnighttruejs
var styles = {
	series : {
		area : {
			type : 'upDown',
			up : {
				color : '#ff0000',
				opacity : 1
			},
			down : {
				color : '#fff000',
				opacity : 1
			},
			size : {
				max : 200,
				min : 10
			}    
		},
		hover : {
			use : true,
			area : {
				up : {
					color : '#ca2a27'
				},
				down : {
					color : '#005fa8'
				}
			}
		}
	}
}

Demo

Publisher Go

animate

Scatter Plot 의 animate 스타일

Parameters  

   defaulttype설명
animateuse truebooleanScatter Plot 의 애니메이션 사용 여부 ( 'true' or 'false' )
type 'bounce'string

Scatter Plot 의 애니메이션 타입

 ( 'linear' or '>' or '<' or '<>' or 'bounce' or 'elastic' or 'backIn' or 'backOut' )

speed 600number애니메이션 속도 ( 0 ~ )

Usage

data.reverseMidnighttruejs
var styles = {
	animate: {
		use : true,				/* 애니메이션 사용 여부 */
		type : 'elastic',		/* 애니메이션 type */
		speed : 600
	}
}

Demo

Publisher Go

drag

Scatter Plot 의 drag 이벤트 

  • enlarge 이벤트와 중복 사용 불가
  • 모바일에서는 드래그 기능을 지원하지 않습니다.

Parameters  

    defaulttype설명
draguse  falsebooleanScatter Plot 의 drag 이벤트 사용 여부 ( 'true' or 'false' )
downanimateusefalsebooleanPlot 의 mouse down 시 애니메이션 사용 여부 ( 'true' or 'false' )
type'linear'string

Plot 의 mouse down 시 애니메이션 타입

 ( 'linear' or '>' or '<' or '<>' or 'bounce' or 'elastic' or 'backIn' or 'backOut' )

opacity0.5numberMouse down 시 Plot 의 투명도 ( 1 ~ 0 )
speed100number애니메이션 속도
upanimateusefalsebooleanPlot 의 mouse up시 애니메이션 사용 여부 ( 'true' or 'false' )
type'linear'string

Plot 의 mouse up 시 애니메이션 타입

 ( 'linear' or '>' or '<' or '<>' or 'bounce' or 'elastic' or 'backIn' or 'backOut' )

speed200number애니메이션 속도

Usage

dragMidnighttruejs
var styles = {
	drag: {
		use : true,				/* 애니메이션 사용 여부 */
		down : {
			animate : {
				use : true,
				type : 'linear',
				opacity : 0.5,
				speed : 100
			}
		},
		up: {
			animate : {
				use : true,
				type : 'linear',
				opacity : 0.5,
				speed : 100
			}
		}
	}
}

Demo

Publisher Go

enlarge

Scatter Plot 의 unlarge 이벤트 - (drag 이벤트와 중복 사용 불가)

Parameters  

   defaulttype설명
enlargeuse falsebooleanScatter Plot 의 enlarge 이벤트 사용 여부 ( 'true' or 'false' )
animateusefalsebooleanScatter Plot 의 enlarge 이벤트 시 애니메이션 사용 여부 ( 'true' or 'false' )
type'linear'string

Plot 의 mouse click 시 애니메이션 타입

 ( 'linear' or '>' or '<' or '<>' or 'bounce' or 'elastic' or 'backIn' or 'backOut' )

speed400number애니메이션 속도

Usage

enlargeMidnighttruejs
var styles = {
	enlarge: {
		use : true,				/* unlarge 이벤트 사용 여부 */
		animate : {
			use : true,			/* animate 사용 여부 */
			type : 'bounce',	/* 애니메이션 type */
			speed : 600			/* 애니메이션 speed */
		}
	}
}

Demo

Publisher Go