This commit is contained in:
jingquan huang 2019-12-19 14:53:35 +08:00
commit 2b52f64b94
3 changed files with 13 additions and 11 deletions

View File

@ -168,7 +168,7 @@
.left_echart{
position: fixed !important;
height: 60%;
left: 0;
left: -100%;
top: 0;
width: 400px;
z-index: 50;

View File

@ -659,10 +659,12 @@ myChart.setOption(option);
myChart.on('brushselected', renderBrushed);
// myChart.on('focusnodeadjacency', renderFocusNodeJacency);
myChart.on('click', function (params) {
// renderFocusNodeJacency(params);
// renderBrushed();
// renderBrushed(params);
console.log(params);
$('.fixed-left').css({left: 0}).addClass('collpased');
// $('.screen-btn').css({left: '360px'});
if (!$('.fixed-left').hasClass('active')) {
$('.screen-btn').css({left: '360px'});
}
$('.collpase-icon').addClass('icon-shouqi').removeClass('icon-zhankai');
const {seriesId, seriesIndex, seriesName, dataIndex, data, value } = params;
myChart.dispatchAction({
type: 'focusNodeAdjacency',

View File

@ -166,12 +166,12 @@
// 根据更新后的option重新画图
function redrawGraph() {
$('.fixed-left').css({left: 0}).addClass('collpased');
// $('.screen-btn').css({left: '360px'});
if (!$('.fixed-left').hasClass('active')) {
$('.screen-btn').css({left: '360px'});
}
$('.collpase-icon').addClass('icon-shouqi').removeClass('icon-zhankai');
// $('.fixed-left').css({left: 0}).addClass('collpased');
// // $('.screen-btn').css({left: '360px'});
// if (!$('.fixed-left').hasClass('active')) {
// $('.screen-btn').css({left: '360px'});
// }
// $('.collpase-icon').addClass('icon-shouqi').removeClass('icon-zhankai');
optionGraph.series[0].data = Object.values(currentGraph.nodes);
optionGraph.series[0].links = Object.values(currentGraph.links);
myChartGraph.setOption(optionGraph);