altariamx2003
asked on
how to move the Y-scale inside a chart with "echarts"
I would like to know if somebody know how to move the labels of the y-axis inside the chart using the libraries "echarts"
this is the code that im trying
and this is a screen of the chart: .
I would like to know if somebody know how to move the labels of the y-axis to inside the chart using the libraries "echarts"
this is the code that im trying
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="ECharts">
<meta name="author" content="kener.linfeng@gmail.com">
<title>ECharts · Example</title>
<script src="./www/js/echarts.js"></script></script>
</head>
<body>
<div id="main" style="height:400px"></div>
<script type="text/javascript">
require.config({
paths: {
echarts: '../../build/dist/'
}
});
require(
[
'echarts',
'echarts/chart/bar',
'echarts/chart/line'
],
function (ec) {
var myChart = ec.init(document.getElementById('main'));
var option = {
tooltip : {
trigger: 'axis'
},
legend: {
data:['Serie 1','Serie 2','Serie 3']
},
toolbox: {
show : true,
feature : {
magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
xAxis : [
{
type : 'category',
boundaryGap: false,
data : ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio']
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'Serie 1',
type:'line',
smooth:true,
itemStyle: {normal: {areaStyle: {type: 'default'}}},
data:[1320, 1132, 601, 234, 120, 90, 20]
} ,
{
name:'Serie 2',
type:'line',
smooth:true,
itemStyle: {normal: {areaStyle: {type: 'default'}}},
data:[30, 182, 434, 791, 390, 30, 10]
},{
name:'Serie 3',
type:'line',
smooth:true,
itemStyle: {normal: {areaStyle: {type: 'default'}}},
data:[10, 12, 21, 54, 260, 830, 710]
}
]
};
myChart.setOption(option);
}
);
</script>
</body>
</html>
and this is a screen of the chart: .
I would like to know if somebody know how to move the labels of the y-axis to inside the chart using the libraries "echarts"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER