国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

echarts寫3d圓環(huán),并解決圓環(huán)數(shù)據(jù)相同時顯示異常問題

這篇具有很好參考價值的文章主要介紹了echarts寫3d圓環(huán),并解決圓環(huán)數(shù)據(jù)相同時顯示異常問題。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

效果圖:

echarts 3d圓環(huán),echarts,3d,javascript

用到的插件(安裝時版本號必須對應否則無效):

  • “echarts”: “^4.9.0”,

  • “echarts-gl”: “^1.1.2”,

代碼分兩個文件:

1.mixins.js文件:
/**
 * 繪制3d圖
 * @param pieData 總數(shù)據(jù)
 * @param internalDiameterRatio:透明的空心占比
 * @param distance 視角到主體的距離
 * @param alpha 旋轉角度
 * @param pieHeight 立體的高度
 * @param opacity 餅或者環(huán)的透明度
 * @param dropSize 餅圖下的點的大小
 */
const getPie3D = (
  pieData,
  internalDiameterRatio,
  distance,
  alpha,
  pieHeight,
  opacity = 1,
  dropSize,
) => {
  const series = [];
  let sumValue = 0;
  let startValue = 0;
  let endValue = 0;
  let legendData = [];
  let legendBfb = [];
  const k = 1 - internalDiameterRatio;
  pieData.sort((a, b) => {
    return b.value - a.value;
  });
  // 為每一個餅圖數(shù)據(jù),生成一個 series-surface 配置
  for (let i = 0; i < pieData.length; i++) {
    sumValue += pieData[i].value;
    const seriesItem = {
      name: typeof pieData[i].name === 'undefined' ? `series${i}` : pieData[i].name,
      type: 'surface',
      parametric: true,
      wireframe: {
        show: false,
      },
      pieData: pieData[i],
      pieStatus: {
        selected: false,
        hovered: false,
        k,
      },
      center: ['10%', '50%'],
    };
    if (typeof pieData[i].itemStyle !== 'undefined') {
      const itemStyle = {};
      itemStyle.color =
        typeof pieData[i].itemStyle.color !== 'undefined' ? pieData[i].itemStyle.color : opacity;
      itemStyle.opacity =
        typeof pieData[i].itemStyle.opacity !== 'undefined'
          ? pieData[i].itemStyle.opacity
          : opacity;
      seriesItem.itemStyle = itemStyle;
    }
    series.push(seriesItem);
  }

  // 使用上一次遍歷時,計算出的數(shù)據(jù)和 sumValue,調用 getParametricEquation 函數(shù),
  // 向每個 series-surface 傳入不同的參數(shù)方程 series-surface.parametricEquation,也就是實現(xiàn)每一個扇形。
  legendData = [];
  legendBfb = [];
  for (let i = 0; i < series.length; i++) {
    endValue = startValue + series[i].pieData.value;
    series[i].pieData.startRatio = startValue / sumValue;
    series[i].pieData.endRatio = endValue / sumValue;
    const arr =
      series.length &&
      series.map((item) => {
        return item.pieData.value;
      });
    const temp = [];
    arr.forEach((item) => {
      if (!temp.includes(item)) {
        temp.push(item);
      }
    });
    const h = temp.length === 1 ? 5 : series[i].pieData.value;
    series[i].parametricEquation = getParametricEquation(
      series[i].pieData.startRatio,
      series[i].pieData.endRatio,
      false,
      false,
      k,
      h,
    );
    startValue = endValue;
    const bfb = fomatFloat(series[i].pieData.value / sumValue, 4);
    legendData.push({
      name: series[i].name,
      value: bfb,
    });
    legendBfb.push({
      name: series[i].name,
      value: bfb,
    });
  }
  const boxHeight = getHeight3D(series, pieHeight); // 通過pieHeight設定3d餅/環(huán)的高度,單位是px
  // 準備待返回的配置項,把準備好的 legendData、series 傳入。
  const option = {
    legend: {
      selectedMode: false,
      show: Object.freeze(false),
      data: legendData,
      orient: Object.freeze('horizontal'),
      left: Object.freeze('center'),
      top: Object.freeze('bottom'),
      // 圖例文字每項之間的間隔
      itemGap: Object.freeze(15),
      textStyle: {
        color: '#fff',
        fontSize: dropSize,
      },
      icon: Object.freeze('circle'),
      formatter(param) {
        const item = legendBfb.filter((val) => val.name === param)[0];
        return `${item.name}  `;
      },
    },
    labelLine: Object.freeze({
      show: false,
      lineStyle: {
        color: '#fff',
      },
    }),
    label: Object.freeze({
      show: false,
      position: 'outside',
      formatter: ' \n{c} n5n3t3z%',
    }),
    tooltip: {
      // backgroundColor: Object.freeze('#033b77'),
      // borderColor: Object.freeze('#21f2c4'),
      textStyle: Object.freeze({
        color: '#fff',
        fontSize: 13,
      }),
      formatter: (params) => {
        if (params.seriesName !== 'mouseoutSeries') {
          const endRatioTemp =
            option.series[params.seriesIndex].pieData &&
            option.series[params.seriesIndex].pieData.endRatio;
          const startRatioTemp =
            option.series[params.seriesIndex].pieData &&
            option.series[params.seriesIndex].pieData.startRatio;
          const bfb = ((endRatioTemp - startRatioTemp) * 100).toFixed(2);
          // 最初始的
          // return (
          //   !isNaN(bfb) ? (`${params.seriesName}<br/>` +
          //     `<span style='display:inline-block;margin-right:.3125rem;border-radius:.625rem;width:.625rem;height:.625rem;background-color:${params.color};'></span>` +
          //     `${bfb}%`) : ''
          // );
          return !isNaN(bfb)
            ? `<span style='font-size:${dropSize}px;'>${params.seriesName}</span><br/>` +
                `<span style='display:inline-block;margin-right:.3125rem;border-radius:.625rem;width:.625rem;height:.625rem;background-color:${params.color};'></span>` +
                `${bfb}%`
            : '';
        }
      },
    },
    xAxis3D: {
      min: -1,
      max: 1,
    },
    yAxis3D: {
      min: -1,
      max: 1,
    },
    zAxis3D: {
      min: -1,
      max: 1,
    },
    grid3D: {
      show: false,
      boxHeight, // 圓環(huán)的高度
      viewControl: {
        // 3d效果可以放大、旋轉等,請自己去查看官方配置
        alpha: 35, // 角度
        distance, // 調整視角到主體的距離,類似調整zoom
        rotateSensitivity: 0, // 設置為0無法旋轉
        zoomSensitivity: 0, // 設置為0無法縮放
        panSensitivity: 0, // 設置為0無法平移
        autoRotate: false, // 自動旋轉
      },
    },
    series,
  };
  return option;
};

/**
 * 生成扇形的曲面參數(shù)方程,用于 series-surface.parametricEquation
 */
const getParametricEquation = (startRatio, endRatio, isSelected, isHovered, k, h) => {
  // 計算
  const midRatio = (startRatio + endRatio) / 2;
  const startRadian = startRatio * Math.PI * 2;
  const endRadian = endRatio * Math.PI * 2;
  const midRadian = midRatio * Math.PI * 2;
  // 如果只有一個扇形,則不實現(xiàn)選中效果。
  if (startRatio === 0 && endRatio === 1) {
    isSelected = false;
  }
  // 通過扇形內徑/外徑的值,換算出輔助參數(shù) k(默認值 1/3)
  k = typeof k !== 'undefined' ? k : 1 / 3;
  // 計算選中效果分別在 x 軸、y 軸方向上的位移(未選中,則位移均為 0)
  const offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0;
  const offsetY = isSelected ? Math.sin(midRadian) * 0.1 : 0;
  // 計算高亮效果的放大比例(未高亮,則比例為 1)
  const hoverRate = isHovered ? 1.05 : 1;
  // 返回曲面參數(shù)方程
  return {
    u: {
      min: -Math.PI,
      max: Math.PI * 3,
      step: Math.PI / 32,
    },
    v: {
      min: 0,
      max: Math.PI * 2,
      step: Math.PI / 20,
    },
    x(u, v) {
      if (u < startRadian) {
        return offsetX + Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate;
      }
      if (u > endRadian) {
        return offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate;
      }
      return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate;
    },
    y(u, v) {
      if (u < startRadian) {
        return offsetY + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate;
      }
      if (u > endRadian) {
        return offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate;
      }
      return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate;
    },
    z(u, v) {
      if (u < -Math.PI * 0.5) {
        return Math.sin(u);
      }
      if (u > Math.PI * 2.5) {
        // console.log('if內部h', h);
        // console.log('if內部結果', Math.sin(u) * h * 0.1);
        return Math.sin(u) * h * 0.2;
        // return Math.sin(u) * 13 * 0.1;
      }
      // console.log('if外部h', h);
      // console.log('if外部結果', Math.sin(v) > 0 ? 1 * h * 0.1 : -1);
      return Math.sin(v) > 0 ? 1 * h * 0.2 : -1;
      // return Math.sin(v) > 0 ? 1 * 13 * 0.1 : -1;
    },
  };
};

/**
 * 獲取3d丙圖的最高扇區(qū)的高度
 */
const getHeight3D = (series, height) => {
  const arr =
    series.length &&
    series.map((item) => {
      return item.pieData.value;
    });
  const temp = [];
  arr.forEach((item) => {
    if (!temp.includes(item)) {
      temp.push(item);
    }
  });

  series.sort((a, b) => {
    return b.pieData.value - a.pieData.value;
  });
  const result = temp.length === 1 ? 25 : (height * 25) / series[0].pieData.value;
  return result;
};

/**
 * 格式化浮點數(shù)
 */
const fomatFloat = (num, n) => {
  let f = parseFloat(num);
  if (isNaN(f)) {
    return false;
  }
  f = Math.round(num * Math.pow(10, n)) / Math.pow(10, n); // n 冪
  let s = f.toString();
  let rs = s.indexOf('.');
  // 判定如果是整數(shù),增加小數(shù)點再補0
  if (rs < 0) {
    rs = s.length;
    s += '.';
  }
  while (s.length <= rs + n) {
    s += '0';
  }
  return s;
};

export { getPie3D, getParametricEquation };
2.pieChart.vue文件:
<template>
  <div class="chart-container">
    <div class="chart" ref="chart"></div>
  </div>
</template>
<script>
import echarts from 'echarts';
// import _ from 'lodash';
import 'echarts-gl';
import { getPie3D, getParametricEquation } from './mixins/index';
const color = ['#2C6DEF', '#AC2424', '#2DB62E', '#DCC436', '#804AE8', '#25C5DA'];
export default {
  name: 'chart',
  props: {
    netDefenseSituList: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      optionData: [],
      statusChart: null,
      option: {},
    };
  },
  created() {
    this.setLabel();
  },
  mounted() {
    this.initChart();
    window.addEventListener('resize', this.resizeChart);
  },
  watch: {
    netDefenseSituList: {
      deep: true,
      immediate: true,
      handler(val) {
        const tempArr = [];
        val.forEach((item) => {
          tempArr.push({
            name: item.title,
            value: item.defenseNumber,
          });
        });
        this.optionData = tempArr;
      },
    },
  },
  methods: {
    resizeChart() {
      this.changeSize();
    },
    setLabel() {
      const fontFamily = 'sans-serif';
      const fontSize = this.chartFontSize;
      const textStyle = {
        fontSize,
        fontFamily,
      };
      const { pieLength, pieLineHeight } = this.adapterData;
      this.optionData.forEach((item, index) => {
        item.legend = {
          show: false,
        };
        item.itemStyle = {
          color: color[index],
        };
        item.textStyle = { ...textStyle };
        item.label = {
          normal: {
            show: false,
            // color: color[index],
            color: '#ffffff',
            fontSize,
            fontFamily,
            position: Object.freeze('right'),
            offset: [0, 3],
            textStyle: {
              ...textStyle,
              color: '#ffffff',
            },
            formatter: ['{b|}', '{d|n5n3t3z%}'].join('\n'), // 用\n來換行
            rich: {
              b: {
                color: '#ffffff',
                fontSize,
                fontFamily,
                lineHeight: 25,
                align: Object.freeze('left'),
              },
              c: {
                color: '#ffffff',
                fontSize,
                fontFamily,
                textShadowColor: Object.freeze('#1c90a6'),
                textShadowOffsetX: 0,
                textShadowOffsetY: 2,
                textShadowBlur: 5,
              },
              d: {
                color: '#ffffff',
                fontSize,
                fontFamily,
                lineHeight: pieLineHeight,
                align: Object.freeze('left'),
              },
            },
          },
        };
        item.labelLine = {
          normal: {
            show: false,
            length: 0,
            length2: Object.freeze(0),
            // smooth: true,
            lineStyle: {
              width: 0,
              // color: color[index],
              color: '#ffffff',
            },
          },
        };
      });
    },
    initChart() {
      const fontFamily = 'sans-serif';
      const fontSize = this.chartFontSize - 4;
      this.statusChart = echarts.init(this.$refs.chart);
      // this.option = getPie3D(this.optionData, 0.75, 180, 30, 6, 1, this.chartFontSizeTwo);
      this.option = getPie3D(this.optionData, 0.75, this.pieView, 30, 6, 1, this.chartFontSizeTwo);
      this.statusChart.setOption(this.option);
      // 是否需要label指引線,如果要就添加一個透明的2d餅狀圖并調整角度使得labelLine和3d的餅狀圖對齊,并再次setOption
      this.option.series.push({
        backgroundColor: Object.freeze('transparent'),
        type: Object.freeze('pie'),
        label: Object.freeze({
          opacity: 0,
          color: '#ffffff',
          fontSize,
          fontFamily,
          lineHeight: 0,
        }),
        // startAngle: -40, // 起始角度,支持范圍[0, 360]。
        startAngle: -30, // 起始角度,支持范圍[0, 360]。
        clockwise: false, // 餅圖的扇區(qū)是否是順時針排布。上述這兩項配置主要是為了對齊3d的樣式
        // radius: Object.freeze(['20%', '60%']),
        // center: Object.freeze(['50%', '50%']),
        radius: Object.freeze(['20%', '45%']),
        center: Object.freeze(['50%', '50%']),
        data: this.optionData,
        itemStyle: Object.freeze({
          opacity: 0, // 這里必須是0,不然2d的圖會覆蓋在表面
        }),
        // pieStatus: {
        //   // selected: false,
        //   // hovered: false,
        //   // k: 0,
        // },
        // pieData: {
        //   // startRatio: 0,
        // },
      });
      this.option = {
        ...this.option,
        tooltip: {
          textStyle: {
            color: '#ffffff',
            fontSize,
            fontFamily,
          },
        },
        grid: {
          top: '2%',
          left: '8%',
        },
      };
      this.statusChart.setOption(this.option);
      this.bindListen(this.statusChart);
    },
    // 監(jiān)聽鼠標事件,實現(xiàn)餅圖選中效果(單選),近似實現(xiàn)高亮(放大)效果。
    // optionName是防止有多個圖表進行定向option傳遞,單個圖表可以不傳,默認是opiton
    bindListen(myChart, optionName = 'option') {
      // let selectedIndex = '';
      let hoveredIndex = '';
      // 監(jiān)聽 mouseover,近似實現(xiàn)高亮(放大)效果
      // myChart.on('mouseover', (params) => {
      //   // 準備重新渲染扇形所需的參數(shù)
      //   let isSelected;
      //   let isHovered;
      //   let startRatio;
      //   let endRatio;
      //   let k;
      //   // 如果觸發(fā) mouseover 的扇形當前已高亮,則不做操作
      //   if (hoveredIndex === params.seriesIndex) {
      //     // 否則進行高亮及必要的取消高亮操作
      //   } else {
      //     // 如果當前有高亮的扇形,取消其高亮狀態(tài)(對 option 更新)
      //     if (hoveredIndex !== '') {
      //       // 從 option.series 中讀取重新渲染扇形所需的參數(shù),將是否高亮設置為 false。
      //       isSelected = this[optionName].series[hoveredIndex].pieStatus.selected;
      //       isHovered = false;
      //       startRatio = this[optionName].series[hoveredIndex].pieData.startRatio;
      //       endRatio = this[optionName].series[hoveredIndex].pieData.endRatio;
      //       k = this[optionName].series[hoveredIndex].pieStatus.k;
      //       // 對當前點擊的扇形,執(zhí)行取消高亮操作(對 option 更新)
      //       this[optionName].series[hoveredIndex].parametricEquation = getParametricEquation(
      //         startRatio,
      //         endRatio,
      //         isSelected,
      //         isHovered,
      //         k,
      //         this[optionName].series[hoveredIndex].pieData.value,
      //       );
      //       this[optionName].series[hoveredIndex].pieStatus.hovered = isHovered;
      //       // 將此前記錄的上次選中的扇形對應的系列號 seriesIndex 清空
      //       hoveredIndex = '';
      //     }
      //     // 如果觸發(fā) mouseover 的扇形不是透明圓環(huán),將其高亮(對 option 更新)
      //     if (params.seriesName !== 'mouseoutSeries') {
      //       isSelected =
      //         this[optionName].series[params.seriesIndex].pieStatus &&
      //         this[optionName].series[params.seriesIndex].pieStatus.selected;
      //       isHovered = true;
      //       startRatio =
      //         this[optionName].series[params.seriesIndex].pieData &&
      //         this[optionName].series[params.seriesIndex].pieData.startRatio;
      //       endRatio =
      //         this[optionName].series[params.seriesIndex].pieData &&
      //         this[optionName].series[params.seriesIndex].pieData.endRatio;
      //       k =
      //         this[optionName].series[params.seriesIndex].pieStatus &&
      //         this[optionName].series[params.seriesIndex].pieStatus.k;
      //       // -------
      //       // 對當前點擊的扇形,執(zhí)行高亮操作(對 option 更新)
      //       this[optionName].series[params.seriesIndex].parametricEquation = getParametricEquation(
      //         startRatio,
      //         endRatio,
      //         isSelected,
      //         isHovered,
      //         k,
      //         _.get(this[optionName], 'series[params.seriesIndex].pieData.value', 0) + 10,
      //       );
      //       this[optionName].series[params.seriesIndex].pieStatus.hovered = isHovered;
      //       // 記錄上次高亮的扇形對應的系列號 seriesIndex
      //       hoveredIndex = params.seriesIndex;
      //     }
      //     // 使用更新后的 option,渲染圖表
      //     myChart.setOption(this[optionName]);
      //   }
      // });
      // 修正取消高亮失敗的 bug
      myChart.on('globalout', () => {
        // 準備重新渲染扇形所需的參數(shù)
        let isSelected;
        let isHovered;
        let startRatio;
        let endRatio;
        let k;
        if (hoveredIndex !== '') {
          // 從 option.series 中讀取重新渲染扇形所需的參數(shù),將是否高亮設置為 true。
          isSelected = this[optionName].series[hoveredIndex].pieStatus.selected;
          isHovered = false;
          k = this[optionName].series[hoveredIndex].pieStatus.k;
          startRatio = this[optionName].series[hoveredIndex].pieData.startRatio;
          endRatio = this[optionName].series[hoveredIndex].pieData.endRatio;
          // 對當前點擊的扇形,執(zhí)行取消高亮操作(對 option 更新)
          this[optionName].series[hoveredIndex].parametricEquation = getParametricEquation(
            startRatio,
            endRatio,
            isSelected,
            isHovered,
            k,
            this[optionName].series[hoveredIndex].pieData.value,
          );
          this[optionName].series[hoveredIndex].pieStatus.hovered = isHovered;
          // 將此前記錄的上次選中的扇形對應的系列號 seriesIndex 清空
          hoveredIndex = '';
        }
        // 使用更新后的 option,渲染圖表
        myChart.setOption(this[optionName]);
      });
    },
    // 自適應寬高
    changeSize() {
      this.statusChart.resize();
    },
  },
  beforeDestroy() {
    window.removeEventListener('resize', this.resizeChart);
  },
};
</script>
<style lang="less" scoped>
.chart-container {
  // position: relative;
  /* width: 549px; */
  /* height: 472px; */
  width: 100%;
  height: 100%;
  padding-bottom: 20px;
  flex: 1;
  .chart {
    z-index: 1;
  }
  .chart {
    width: 100%;
    height: 100%;
  }
}
</style>

頁面引用:

netDefenseSituList:為傳入的數(shù)據(jù)文章來源地址http://www.zghlxwxcb.cn/news/detail-768190.html

 <pic-chart :netDefenseSituList="netDefenseSituList" />

到了這里,關于echarts寫3d圓環(huán),并解決圓環(huán)數(shù)據(jù)相同時顯示異常問題的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉載,請注明出處: 如若內容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • Echarts折線圖交點呈現(xiàn)為圓點加圓環(huán)的效果實現(xiàn)

    Echarts折線圖交點呈現(xiàn)為圓點加圓環(huán)的效果實現(xiàn)

    series中的symbolSize設置圓點大小,itemStyle中的color設置圓點顏色,外圓環(huán)使用邊框屬性實現(xiàn)即borderWidth、borderColor: 效果:

    2024年02月12日
    瀏覽(39)
  • []關于解決pytorch訓練神經(jīng)網(wǎng)絡時顯存一直增長的問題

    @[原創(chuàng)]關于解決pytorch訓練神經(jīng)網(wǎng)絡時顯存一直增長的問題 在訓練自定義loss和自定義網(wǎng)絡結構的一個模型的時候,發(fā)現(xiàn)模型和數(shù)據(jù)都比較簡單的情況下,在訓練過程中居然把24g的顯卡拉爆了顯存。 然后使用nvidia-smi -l觀察顯存變化,發(fā)現(xiàn)是有規(guī)律的顯存一直增加,直到OOM。 在

    2024年02月14日
    瀏覽(20)
  • 解決echarts配置滾動(dataZoom)后導出圖片數(shù)據(jù)不全問題

    解決echarts配置滾動(dataZoom)后導出圖片數(shù)據(jù)不全問題

    先展現(xiàn)一個echarts,并配置dataZoom,每頁最多10條數(shù)據(jù),超出滾動 效果: 調用echarts中getDataURL獲取圖表的數(shù)據(jù) URL 問題來了:如數(shù)據(jù)不分頁則可以下載全數(shù)據(jù),如數(shù)據(jù)分頁了則只能下載出可視區(qū)內容,如何解決? 解決思路:echarts最終生成了canvas,canvas的寬高就是當前可視區(qū)的寬

    2024年01月19日
    瀏覽(25)
  • 解決vue3集成echarts數(shù)據(jù)刷新后圖表不刷新問題

    vue3 集成 echarts 最大的坑就是出現(xiàn)了,reactive 的數(shù)據(jù) 刷新了,但圖表缺不會刷新,查了很多資料,試了很多方式都沒效果,最后測試出來解決方法很簡單: 核心代碼: 附上 TSX 整個頁面參考

    2024年02月13日
    瀏覽(28)
  • HighCharts實現(xiàn)3D不同高度圓環(huán)圖、3D餅圖

    HighCharts實現(xiàn)3D不同高度圓環(huán)圖、3D餅圖

    最近做可視化比較多,就常用的圖表類型做了一下總結。 因為做可視化的圖表代碼量非常大,所以會把echarts圖表單獨抽離出來,封裝成一個組件,也可以復用,所以這里我直接把封裝的組件直接放在這里,是可以直接拿來用的,根據(jù)所需稍作修改即可。 這里都是用的vue3,其

    2024年02月12日
    瀏覽(21)
  • 解決TortoiseGit軟件Git Show log時顯示Too many files to display的問題

    解決TortoiseGit軟件Git Show log時顯示Too many files to display的問題

    有時代碼提交修改的文件比較多,當查看log時無法顯示出來修改的文件列表,如下所示: 將LogTooManyItemsThreshold盡可能配置得大一些。 https://gitlab.com/tortoisegit/tortoisegit/-/issues/3878

    2024年04月12日
    瀏覽(105)
  • Vue——printjs打印el-table,echarts等打印不全,異常解決

    PrintJs簡單使用 PrintJs官網(wǎng)地址:https://printjs.crabbly.com/ 1、可以從GitHub版本下載最新版本的Print.js:https://github.com/crabbly/Print.js/releases 2、npm 安裝 更多參考:https://blog.csdn.net/sunxiaoju/article/details/126284860 echarts無法打印解決 修改print.js的getHtml,增加對canvas的處理,將echarts轉為圖片

    2024年02月06日
    瀏覽(25)
  • 【算法】【差分數(shù)組】解決連續(xù)空間改變相同值的問題

    將原數(shù)組每個值減去前一個值,得到的新數(shù)組是差分數(shù)組 d i s [ k ] = a [ k ] ? a [ k ? 1 ] dis[k] = a[k] - a[k-1] d i s [ k ] = a [ k ] ? a [ k ? 1 ] 如: 原數(shù)組為 [ 1 , 2 , 3 , 5 ] [1,2,3,5] [ 1 , 2 , 3 , 5 ] 得到的差分數(shù)組為 [ 1 , 1 , 1 , 2 ] [1,1,1,2] [ 1 , 1 , 1 , 2 ] 通過計算差分數(shù)組的前綴和,可以得

    2024年02月08日
    瀏覽(28)
  • css的rotate3d實現(xiàn)炫酷的圓環(huán)轉動動畫

    css的rotate3d實現(xiàn)炫酷的圓環(huán)轉動動畫

    2.1 rotate3d rotate3d:rotate3d() CSS 函數(shù)定義一個變換,它將元素圍繞固定軸移動而不使其變形。運動量由指定的角度定義; 如果為正,運動將為順時針,如果為負,則為逆時針。 語法: 含義: x 類型,可以是 0 到 1 之間的數(shù)值,表示旋轉軸 X 坐標方向的矢量。 y 類型,可以是 0

    2024年02月02日
    瀏覽(29)
  • es elasticsearch 十四 各種機制 評分機制 正序索引 解決跳躍結果問題 解決耗時過長問題 解決相同屬性值都到一個地方

    es elasticsearch 十四 各種機制 評分機制 正序索引 解決跳躍結果問題 解決耗時過長問題 解決相同屬性值都到一個地方

    目錄 評分機制 機制 查看評分實現(xiàn)如何算出來的explain=true 分析能否被搜索到 Doc value 正排序索引 Query phase Fetch phase Preference 問題 解決跳躍結果問題 Timeout 到達時間直接返回,解決耗時過長問題 Routing 數(shù)據(jù)準確分配到某地,解決相同屬性值都到一個地方 評分機制 機制 TF分詞頻

    2024年02月08日
    瀏覽(32)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包