# E-Charts

## Introduction

A Declarative Framework for Rapid Construction of Web-based Visualization, for more details you can check[ here.](https://ecomfe.github.io/echarts-doc/public/en/option.html#title)

## How to Setup

### **HTML Structure**

```markup
<div id="e_chart_6" class="" style="height:294px;"></div>
```

## Dependency

### JS

```markup
<!-- EChartJS JavaScript -->
<script src="vendors/echarts/dist/echarts-en.min.js"></script>
<script src="dist/js/areacharts-data.js"></script>
```

### Initialize Echarts JS

#### Line Chart

```javascript
if( $('#e_chart_6').length > 0 ){
	var e_chart_6 = echarts.init(document.getElementById('e_chart_6'));
	var option6 = {
		tooltip: {
			show: true,
			trigger: 'axis',
			backgroundColor: '#fff',
			borderRadius:6,
			padding:6,
			axisPointer:{
				lineStyle:{
					width:0,
				}
			},
			textStyle: {
				color: '#324148',
				fontStyle: 'normal',
				fontWeight: 'normal',
				fontFamily: 'inherit',
				fontSize: 12
			}	
		},
		xAxis: {
			type: 'category',
			boundaryGap: false,
			data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
			axisLine: {
				show:false
			},
			axisTick: {
				show:false
			},
			axisLabel: {
				textStyle: {
					color: '#5e7d8a'
				}
			}
		},
		yAxis: {
			type: 'value',
			axisLine: {
				show:false
			},
			axisTick: {
				show:false
			},
			axisLabel: {
				textStyle: {
					color: '#5e7d8a'
				}
			},
			splitLine: {
				lineStyle: {
					color: '#eaecec',
				}
			}
		},
	   
		series: [
			{
				data:[120, 132, 101, 134, 90, 230, 210],
				type: 'line',
				stack: 'a',
				symbolSize: 6,
				itemStyle: {
					color: '#00acf0',
				},
				lineStyle: {
					color: '#00acf0',
					width:2,
				}
			}
		]
	};
	e_chart_6.setOption(option6);
	e_chart_6.resize();
}
```

#### Bar Chart

```javascript
if( $('#e_chart_6').length > 0 ){
	var eChart_6 = echarts.init(document.getElementById('e_chart_6'));
	var option = {
		color: ['#00acf0'],
		tooltip: {
			show: true,
			trigger: 'axis',
			backgroundColor: '#fff',
			borderRadius:6,
			padding:6,
			axisPointer:{
				lineStyle:{
					width:0,
				}
			},
			textStyle: {
				color: '#324148',
				fontStyle: 'normal',
				fontWeight: 'normal',
				fontFamily: 'inherit',
				fontSize: 12
			}	
		},
		
		xAxis: [{
			type: 'category',
			data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
			axisLine: {
				show:false
			},
			axisTick: {
				show:false
			},
			axisLabel: {
				textStyle: {
					color: '#5e7d8a'
				}
			}
		}],
		yAxis: {
			type: 'value',
			axisLine: {
				show:false
			},
			axisTick: {
				show:false
			},
			axisLabel: {
				textStyle: {
					color: '#5e7d8a'
				}
			},
			splitLine: {
				lineStyle: {
					color: '#eaecec',
				}
			}
		},
		series: [{
			data: [120, 200, 150, 80, 70, 110, 130],
			type: 'bar',
			barMaxWidth: 30,
			itemStyle: {
				normal: {
					barBorderRadius: [6, 6, 0, 0] ,
				}
			},
		}]
	};
	eChart_6.setOption(option);
	eChart_6.resize();
}
```

#### Area Chart

```javascript
if( $('#e_chart_6').length > 0 ){
	var e_chart_6 = echarts.init(document.getElementById('e_chart_6'));
	var option6 = {
		tooltip: {
			show: true,
			trigger: 'axis',
			backgroundColor: '#fff',
			borderRadius:6,
			padding:6,
			axisPointer:{
				lineStyle:{
					width:0,
				}
			},
			textStyle: {
				color: '#324148',
				fontStyle: 'normal',
				fontWeight: 'normal',
				fontFamily: 'inherit',
				fontSize: 12
			}	
		},
		xAxis: {
			type: 'category',
			boundaryGap: false,
			data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
			axisLine: {
				show:false
			},
			axisTick: {
				show:false
			},
			axisLabel: {
				textStyle: {
					color: '#5e7d8a'
				}
			}
		},
		yAxis: {
			type: 'value',
			axisLine: {
				show:false
			},
			axisTick: {
				show:false
			},
			axisLabel: {
				textStyle: {
					color: '#5e7d8a'
				}
			},
			splitLine: {
				lineStyle: {
					color: '#eaecec',
				}
			}
		},
	   
		series: [
			{
				data:[120, 132, 101, 134, 90, 230, 210],
				type: 'line',
				stack: 'a',
				symbolSize: 6,
				itemStyle: {
					color: '#00acf0',
				},
				lineStyle: {
					color: '#00acf0',
					width:2,
				},
				areaStyle: {
					color: '#ffbf36',
				},
			}
		]
	};
	e_chart_6.setOption(option6);
	e_chart_6.resize();
}
```

#### Donut Chart

```javascript
if( $('#e_chart_6').length > 0 ){
	var eChart_6 = echarts.init(document.getElementById('e_chart_6'));
	var dataStyle = {
		normal: {
			label: {
				show: false
			},
			labelLine: {
				show: false
			},
			shadowBlur: 40,
			borderWidth: 10,
			shadowColor: 'rgba(0, 0, 0, 0)' //边框阴影
		}
	};
	var placeHolderStyle = {
		normal: {
			color: '#22af47',
			label: {
				show: false
			},
			labelLine: {
				show: false
			}
		},
		emphasis: {
			color: '#22af47'
		}
	};
	var option5 = {
		backgroundColor: '#fff',
		title: {
			text: '匹配度',
			x: 'center',
			y: 'center',
			textStyle: {
				fontWeight: 'normal',
				fontSize: 24,
				color: "#fff",
			}
		},
		tooltip: {
			show: true,
			backgroundColor: '#fff',
			borderRadius:6,
			padding:6,
			axisPointer:{
				lineStyle:{
					width:0,
				}
			},
			textStyle: {
				color: '#324148',
				fontStyle: 'normal',
				fontWeight: 'normal',
				fontFamily: 'inherit',
				fontSize: 12
			}	
		},
		series: [{
				name: 'Line 1',
				type: 'pie',
				clockWise: false,
				radius: ['40%', '50%'],
				center:['50%','50%'],
				itemStyle: dataStyle,
				hoverAnimation: false,
				startAngle: 90,
				label:{
					borderRadius:'10',
				},
				data: [{
						value: 54.6,
						name: 'b',
						itemStyle: {
							normal: {
								color: '#00acf0'
							}
						}
					},
					{
						value: 45.4,
						name: '',
						tooltip: {
							show: false
						},
						itemStyle: placeHolderStyle
					},
				]
			},
			{
				name: 'Line 2',
				type: 'pie',
				clockWise: false,
				radius: ['80%', '70%'],
				center:['50%','50%'],
				itemStyle: dataStyle,
				hoverAnimation: false,
				startAngle: 90,
				data: [{
						value: 56.7,
						name: 'a',
						itemStyle: {
							normal: {
								color: '#00acf0'
							}
						}
					},
					{
						value: 43.3,
						name: '',
						tooltip: {
							show: false
						},
						itemStyle: placeHolderStyle
					},
				]
			},
		]
	};
	eChart_6.setOption(option5);
	eChart_6.resize();
}
	
```

#### Pie Chart

```javascript
if( $('#e_chart_6').length > 0 ){
	var eChart_6 = echarts.init(document.getElementById('e_chart_6'));
	var option = {
		tooltip: {
			show: true,
			backgroundColor: '#fff',
			borderRadius:6,
			padding:6,
			axisPointer:{
				lineStyle:{
					width:0,
				}
			},
			textStyle: {
				color: '#324148',
				fontStyle: 'normal',
				fontWeight: 'normal',
				fontFamily: 'inherit',
				fontSize: 12
			}	
		},
		series: [
			{
				name:'',
				type:'pie',
				radius : '55%',
				color: ['#00acf0', '#ffbf36', '#f83f37', '#22af47'],
				data:[
					{value:435, name:''},
					{value:679, name:''},
					{value:848, name:''},
					{value:348, name:''},
				],
				labelLine: {
					show:false
				}
			}
		]
	};
	eChart_6.setOption(option);
	eChart_6.resize();
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hencework.gitbook.io/pangong/charts/e-charts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
