export const getLegendBottomNoScroll = function (style: any) { let legend = { // type: "scroll", show: true, left: "center", bottom: "0%", // icon: "circle", //采用默认symbol作为图例 orient: "horizontal", itemGap: 8, itemWidth: style.fontSize - 1, itemHeight: style.fontSize - 1, textStyle: { fontSize: style.fontSize - 1, fontWeight: 600, padding: [0, 0, 0, 0], } } return legend; } export const getLegendRightScroll = function (style: any) { let legend = { show: true, type: "scroll", right: "0%", orient: "vertical", top: "14%", bottom: "12%", width: "100", // icon: "circle", //采用默认symbol作为图例 itemGap: 10, itemWidth: style.fontSize - 2, itemHeight: style.fontSize - 2, pageIconSize: style.fontSize, pageTextStyle: { fontSize: style.fontSize }, pageIcons: { vertical: [ "path://M472.064 272.448l-399.232 399.232c-22.08 22.08-22.08 57.792 0 79.872 22.016 22.016 57.792 22.08 79.872 0L512 392.256l359.296 359.296c22.016 22.016 57.792 22.08 79.872 0 22.08-22.08 22.016-57.792 0-79.872L551.936 272.448C529.856 250.432 494.144 250.432 472.064 272.448z", "path://M472.064 751.552 72.832 352.32c-22.08-22.08-22.08-57.792 0-79.872 22.016-22.016 57.792-22.08 79.872 0L512 631.744l359.296-359.296c22.016-22.016 57.792-22.08 79.872 0 22.08 22.08 22.016 57.792 0 79.872l-399.232 399.232C529.856 773.568 494.144 773.568 472.064 751.552z" ], pageIconColor: "#1D9FC0" }, // pageIcons: // [ // "path://M472.064 272.448l-399.232 399.232c-22.08 22.08-22.08 57.792 0 79.872 22.016 22.016 57.792 22.08 79.872 0L512 392.256l359.296 359.296c22.016 22.016 57.792 22.08 79.872 0 22.08-22.08 22.016-57.792 0-79.872L551.936 272.448C529.856 250.432 494.144 250.432 472.064 272.448z", // "path://M472.064 751.552 72.832 352.32c-22.08-22.08-22.08-57.792 0-79.872 22.016-22.016 57.792-22.08 79.872 0L512 631.744l359.296-359.296c22.016-22.016 57.792-22.08 79.872 0 22.08 22.08 22.016 57.792 0 79.872l-399.232 399.232C529.856 773.568 494.144 773.568 472.064 751.552z" // ], textStyle: { fontSize: style.fontSize, fontWeight: "600", padding: [2, 0, 0, 0], }, } return legend; } export const getLegendNotShow = function (style: any) { let legend = { show: false, type: "scroll", right: "0%", orient: "vertical", top: "14%", bottom: "12%", width: "100", // icon: "circle", //采用默认symbol作为图例 itemGap: 10, itemWidth: style.fontSize - 2, itemHeight: style.fontSize - 2, pageIconSize: style.fontSize, pageIcons: { vertical: [ "path://M472.064 272.448l-399.232 399.232c-22.08 22.08-22.08 57.792 0 79.872 22.016 22.016 57.792 22.08 79.872 0L512 392.256l359.296 359.296c22.016 22.016 57.792 22.08 79.872 0 22.08-22.08 22.016-57.792 0-79.872L551.936 272.448C529.856 250.432 494.144 250.432 472.064 272.448z", "path://M472.064 751.552 72.832 352.32c-22.08-22.08-22.08-57.792 0-79.872 22.016-22.016 57.792-22.08 79.872 0L512 631.744l359.296-359.296c22.016-22.016 57.792-22.08 79.872 0 22.08 22.08 22.016 57.792 0 79.872l-399.232 399.232C529.856 773.568 494.144 773.568 472.064 751.552z" ], pageIconColor: "##1D9FC0" }, // pageIcons: // [ // "path://M472.064 272.448l-399.232 399.232c-22.08 22.08-22.08 57.792 0 79.872 22.016 22.016 57.792 22.08 79.872 0L512 392.256l359.296 359.296c22.016 22.016 57.792 22.08 79.872 0 22.08-22.08 22.016-57.792 0-79.872L551.936 272.448C529.856 250.432 494.144 250.432 472.064 272.448z", // "path://M472.064 751.552 72.832 352.32c-22.08-22.08-22.08-57.792 0-79.872 22.016-22.016 57.792-22.08 79.872 0L512 631.744l359.296-359.296c22.016-22.016 57.792-22.08 79.872 0 22.08 22.08 22.016 57.792 0 79.872l-399.232 399.232C529.856 773.568 494.144 773.568 472.064 751.552z" // ], textStyle: { fontSize: style.fontSize, fontWeight: "600", padding: [2, 0, 0, 0], }, } return legend; } // 获取横向图例配置 (horizontal_legend) export function getHorizontalLegend(style: any) { const horizontal_legend = { show: true, top: 'bottom', icon: 'circle', itemGap: 8, itemWidth: style.fontSize - 2, itemHeight: style.fontSize - 2, textStyle: { fontWeight: 'bold', fontSize: style.fontSize, padding: 0 } } return horizontal_legend; } // 获取悬浮图例配置 (bar图) export function getAboveBlock(style: any) { const aboveblock_legend = { show: true, top: 'center', orient: 'vertical', right: '5%', icon: 'circle', // data: seriesName, borderWidth: 0.5, backgroundColor: '#fff', borderColor: '#222', border: 1, shadowBlur: 5, shadowColor: 'rgba(0, 0, 0, 0.3)', shadowOffsetX: 2, shadowOffsetY: 2, itemGap: 8, itemWidth: style.fontSize - 2, itemHeight: style.fontSize - 2, textStyle: { fontWeight: 'bold', fontSize: style.fontSize - 2, color: '#333333', padding: [0, 6, 0, 0] } } return aboveblock_legend; } //todo 声学分析lengend export const getNoiseAnalysisLineLegend = function (style,monitorlist, rectlegend) { let legend = [{ selectedMode: false, icon: "circle", type: 'scroll', itemWidth: 8, itemHeight: 8, itemGap: style.legend[0].itemGap, textStyle: { fontSize: 10, }, left: style.legend[0].left, top: 70, data: monitorlist }, { icon: "rect", left: style.legend[1].left, top: 10, itemWidth: 8, itemHeight: 8, itemGap: style.legend[1].itemGap, data: rectlegend } ] return legend; } // 获取底部带scroll的图例 export const getLegendBottomScroll = (style) => { let legend = { type: "scroll", show: true, left: "center", bottom: "0%", icon: "circle", //采用默认symbol作为图例 orient: "horizontal", itemGap: 8, itemWidth: style.fontSize - 2, itemHeight: style.fontSize - 2, pageIconSize: style.fontSize, pageIcons: { horizontal: [ "path://M373.076 512c0-6.478 2.573-12.691 7.154-17.271l229-228.99999999c9.53799999-9.539 25.003-9.53900001 34.54099999-1e-8s9.538 25.002 0 34.541l-211.72899999 211.72800001 211.729 211.72799999c9.53799999 9.539 9.538 25.002 0 34.541s-25.003 9.53900001-34.541 0l-229-228.998c-4.581-4.58-7.154-10.793-7.154-17.27099999z", "path://M650.924 512c0 6.478-2.573 12.691-7.154 17.271l-229 228.99999999c-9.53799999 9.539-25.003 9.53900001-34.54099999 1e-8s-9.538-25.002 0-34.541l211.72899999-211.72800001-211.729-211.72799999c-9.53799999-9.539-9.538-25.002 0-34.541s25.003-9.53900001 34.541 0l229 228.998c4.581 4.58 7.154 10.793 7.154 17.27099999z" ], pageIconColor: "#1D9FC0" }, textStyle: { fontSize: style.fontSize, fontWeight: 600, padding: [0, 0, 0, 0], } } return legend; }