|  |  | @ -14,6 +14,8 @@ import { | 
			
		
	
		
			
				
					|  |  |  | import { isEditMode } from '../../global/validate'; | 
			
		
	
		
			
				
					|  |  |  | import luckysheetsizeauto from '../../controllers/resize'; | 
			
		
	
		
			
				
					|  |  |  | import { getvisibledatarow, getvisibledatacolumn} from '../../methods/get' | 
			
		
	
		
			
				
					|  |  |  | let _rowLocation = rowLocation | 
			
		
	
		
			
				
					|  |  |  | let _colLocation = colLocation | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | // Dynamically load dependent scripts and styles
 | 
			
		
	
		
			
				
					|  |  |  | const dependScripts = [ | 
			
		
	
	
		
			
				
					|  |  | @ -218,9 +220,9 @@ function chart_selection(){ | 
			
		
	
		
			
				
					|  |  |  |             $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, | 
			
		
	
		
			
				
					|  |  |  |             winW = $(window).width() + scrollLeft | 
			
		
	
		
			
				
					|  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |         var rowLocation = rowLocation(y), | 
			
		
	
		
			
				
					|  |  |  |         var rowLocation = _rowLocation(y), | 
			
		
	
		
			
				
					|  |  |  |             row_index = rowLocation[2] | 
			
		
	
		
			
				
					|  |  |  |         var colLocation = colLocation(x), | 
			
		
	
		
			
				
					|  |  |  |         var colLocation = _colLocation(x), | 
			
		
	
		
			
				
					|  |  |  |             col_index = colLocation[2] | 
			
		
	
		
			
				
					|  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |         var visibledatarow = getvisibledatarow() | 
			
		
	
	
		
			
				
					|  |  | @ -464,13 +466,13 @@ function chart_selection(){ | 
			
		
	
		
			
				
					|  |  |  |         var updateJson = chartInfo.currentChart | 
			
		
	
		
			
				
					|  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |         updateJson.rangeTxt = getRangetxt( | 
			
		
	
		
			
				
					|  |  |  |             luckysheet.currentSheetIndex, | 
			
		
	
		
			
				
					|  |  |  |             chartInfo.currentSheetIndex, | 
			
		
	
		
			
				
					|  |  |  |             updateJson.rangeArray[0], | 
			
		
	
		
			
				
					|  |  |  |             luckysheet.currentSheetIndex | 
			
		
	
		
			
				
					|  |  |  |             chartInfo.currentSheetIndex | 
			
		
	
		
			
				
					|  |  |  |         ) | 
			
		
	
		
			
				
					|  |  |  |         updateJson.chartData = getdatabyselection( | 
			
		
	
		
			
				
					|  |  |  |             updateJson.rangeArray[0], | 
			
		
	
		
			
				
					|  |  |  |             luckysheet.currentSheetIndex | 
			
		
	
		
			
				
					|  |  |  |             chartInfo.currentSheetIndex | 
			
		
	
		
			
				
					|  |  |  |         ) | 
			
		
	
		
			
				
					|  |  |  |         // 渲染
 | 
			
		
	
		
			
				
					|  |  |  |         chartInfo.changeChartRange(updateJson.chart_id, updateJson.chartData, updateJson.rangeArray, updateJson.rangeTxt) | 
			
		
	
	
		
			
				
					|  |  | @ -499,9 +501,9 @@ function chart_selection(){ | 
			
		
	
		
			
				
					|  |  |  |             $(window).height() + scrollTop - sheetBarHeight - statisticBarHeight, | 
			
		
	
		
			
				
					|  |  |  |             winW = $(window).width() + scrollLeft | 
			
		
	
		
			
				
					|  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |         var rowLocation = rowLocation(y), | 
			
		
	
		
			
				
					|  |  |  |         var rowLocation = _rowLocation(y), | 
			
		
	
		
			
				
					|  |  |  |             row_index = rowLocation[2] | 
			
		
	
		
			
				
					|  |  |  |         var colLocation = colLocation(x), | 
			
		
	
		
			
				
					|  |  |  |         var colLocation = _colLocation(x), | 
			
		
	
		
			
				
					|  |  |  |             col_index = colLocation[2] | 
			
		
	
		
			
				
					|  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |         var visibledatarow = getvisibledatarow() | 
			
		
	
	
		
			
				
					|  |  | @ -784,13 +786,13 @@ function chart_selection(){ | 
			
		
	
		
			
				
					|  |  |  |         chartInfo.chart_selection.rangeResize = null | 
			
		
	
		
			
				
					|  |  |  |    | 
			
		
	
		
			
				
					|  |  |  |         updateJson.rangeTxt = getRangetxt( | 
			
		
	
		
			
				
					|  |  |  |             luckysheet.currentSheetIndex, | 
			
		
	
		
			
				
					|  |  |  |             chartInfo.currentSheetIndex, | 
			
		
	
		
			
				
					|  |  |  |             updateJson.rangeArray[0], | 
			
		
	
		
			
				
					|  |  |  |             luckysheet.currentSheetIndex | 
			
		
	
		
			
				
					|  |  |  |             chartInfo.currentSheetIndex | 
			
		
	
		
			
				
					|  |  |  |         ) | 
			
		
	
		
			
				
					|  |  |  |         updateJson.chartData = getdatabyselection( | 
			
		
	
		
			
				
					|  |  |  |             updateJson.rangeArray[0], | 
			
		
	
		
			
				
					|  |  |  |             luckysheet.currentSheetIndex | 
			
		
	
		
			
				
					|  |  |  |             chartInfo.currentSheetIndex | 
			
		
	
		
			
				
					|  |  |  |         ) | 
			
		
	
		
			
				
					|  |  |  |         // 渲染
 | 
			
		
	
		
			
				
					|  |  |  |         chartInfo.changeChartRange(updateJson.chart_id, updateJson.chartData, updateJson.rangeArray, updateJson.rangeTxt) | 
			
		
	
	
		
			
				
					|  |  | @ -799,7 +801,6 @@ function chart_selection(){ | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | }  | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | // create chart
 | 
			
		
	
		
			
				
					|  |  |  | function createLuckyChart(width, height, left, top) { | 
			
		
	
		
			
				
					|  |  |  |     //如果只选中一个单元格,则自动填充选取
 | 
			
		
	
	
		
			
				
					|  |  | @ -951,30 +952,12 @@ function createLuckyChart(width, height, left, top) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     //处理区域高亮框参数,当前页中,只有当前的图表的needRangShow为true,其他为false
 | 
			
		
	
		
			
				
					|  |  |  |     showNeedRangeShow(chart_id); | 
			
		
	
		
			
				
					|  |  |  |     // highline current chart
 | 
			
		
	
		
			
				
					|  |  |  |     // $('.luckysheet-cell-main').click(function (e) {
 | 
			
		
	
		
			
				
					|  |  |  |     //     if (e.target.tagName == 'CANVAS' && e.target.offsetParent && e.target.offsetParent.offsetParent && e.target.offsetParent.offsetParent.id && e.target.offsetParent.offsetParent.id.slice(0, 6) == 'chart_') {
 | 
			
		
	
		
			
				
					|  |  |  |     //         chartInfo.highlightChart(e.target.offsetParent.offsetParent.id)
 | 
			
		
	
		
			
				
					|  |  |  |     //         chartInfo.chartparam.luckysheetCurrentChartMoveObj = $(e.target.offsetParent.offsetParent.id + '_c')
 | 
			
		
	
		
			
				
					|  |  |  |     //         chartInfo.chartparam.luckysheetCurrentChartResizeObj = $(e.target.offsetParent.offsetParent.id + '_c')
 | 
			
		
	
		
			
				
					|  |  |  |     //         chartInfo.chartparam.luckysheetCurrentChartActive = true
 | 
			
		
	
		
			
				
					|  |  |  |     //         document.getElementById(e.target.offsetParent.offsetParent.id + '_c').style.zIndex = ++chartInfo.zIndex
 | 
			
		
	
		
			
				
					|  |  |  |     //         $('.chartSetting').css('display', 'block')
 | 
			
		
	
		
			
				
					|  |  |  |     //         return
 | 
			
		
	
		
			
				
					|  |  |  |     //     }
 | 
			
		
	
		
			
				
					|  |  |  |     //     $('.chartSetting').css('display', 'none')
 | 
			
		
	
		
			
				
					|  |  |  |     //     chartInfo.chartparam.luckysheetCurrentChartActive = false
 | 
			
		
	
		
			
				
					|  |  |  |     // })
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     // delete current chart
 | 
			
		
	
		
			
				
					|  |  |  |     $(`#${chart_id}_c .luckysheet-modal-controll-del`).click(function (e) { | 
			
		
	
		
			
				
					|  |  |  |         delChart(chart_id) | 
			
		
	
		
			
				
					|  |  |  |     }) | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     // chartInfo.chartparam.luckysheetCurrentChartMoveObj = $(`#${chart_id}_c `)
 | 
			
		
	
		
			
				
					|  |  |  |     // chartInfo.chartparam.luckysheetCurrentChartResizeObj = $(`#${chart_id}_c `)
 | 
			
		
	
		
			
				
					|  |  |  |     // chartInfo.chartparam.luckysheetCurrentChartActive = true
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     // move chart
 | 
			
		
	
		
			
				
					|  |  |  |     $t.mousedown(function (e) { | 
			
		
	
		
			
				
					|  |  |  |         //允许拖动渲染框
 | 
			
		
	
	
		
			
				
					|  |  | @ -1073,7 +1056,7 @@ function delChart(chart_id) { | 
			
		
	
		
			
				
					|  |  |  |     $(`.luckysheet-cell-main #${chart_id}_c`).remove() | 
			
		
	
		
			
				
					|  |  |  |     // delete storage
 | 
			
		
	
		
			
				
					|  |  |  |     let sheetFile = chartInfo.luckysheetfile[getSheetIndex(chartInfo.currentSheetIndex)] | 
			
		
	
		
			
				
					|  |  |  |     sheetFile.chart.findIndex(item => item.chart_id == chart_id) | 
			
		
	
		
			
				
					|  |  |  |     let index = sheetFile.chart.findIndex(item => item.chart_id == chart_id) | 
			
		
	
		
			
				
					|  |  |  |     sheetFile.chart.splice(index, 1) | 
			
		
	
		
			
				
					|  |  |  |     // api call
 | 
			
		
	
		
			
				
					|  |  |  |     chartInfo.deleteChart(chart_id) | 
			
		
	
	
		
			
				
					|  |  | 
 |