|  |  | 1 | +<template> | 
|  |  | 2 | +  <div class="go-content-box"> | 
|  |  | 3 | +    <svg :width="w" :height="h" fill="none"> | 
|  |  | 4 | +      <defs> | 
|  |  | 5 | +        <linearGradient id="linear_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 
|  |  | 6 | +          <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" /> | 
|  |  | 7 | +          <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="1" /> | 
|  |  | 8 | +        </linearGradient> | 
|  |  | 9 | +        <linearGradient id="linear_1" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 
|  |  | 10 | +          <stop offset="0" :stop-color="attribute.linearColors[2]" stop-opacity="1" /> | 
|  |  | 11 | +          <stop offset="1" :stop-color="attribute.linearColors[3]" stop-opacity="0" /> | 
|  |  | 12 | +        </linearGradient> | 
|  |  | 13 | +        <linearGradient id="linear_2" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 
|  |  | 14 | +          <stop offset="0" :stop-color="attribute.linearColors[4]" stop-opacity="1" /> | 
|  |  | 15 | +          <stop offset="1" :stop-color="attribute.linearColors[5]" stop-opacity="0" /> | 
|  |  | 16 | +        </linearGradient> | 
|  |  | 17 | +      </defs> | 
|  |  | 18 | +      <g opacity="1" transform="translate(-6.249999273677531e-8 0.5)  rotate(0 160.00000003125 15.000000000000005)"> | 
|  |  | 19 | +        <path | 
|  |  | 20 | +          id="矩形 16" | 
|  |  | 21 | +          fill-rule="evenodd" | 
|  |  | 22 | +          fill="url(#linear_0)" | 
|  |  | 23 | +          transform="translate(6.249999895402425e-8 2)  rotate(0 160 13)" | 
|  |  | 24 | +          opacity="1" | 
|  |  | 25 | +          :d="`M0,${h - 5} L${w},${h - 5} L${w},0 L0,0 L0,${h - 5} Z`" | 
|  |  | 26 | +        /> | 
|  |  | 27 | +        <g opacity="1" :transform="`translate(34.0000000625  ${h / 2 - 26 / 2})  rotate(0 46 13)`"> | 
|  |  | 28 | +          <text> | 
|  |  | 29 | +            <tspan | 
|  |  | 30 | +              :x="attribute.fontPos.x" | 
|  |  | 31 | +              :y="attribute.fontPos.y" | 
|  |  | 32 | +              :font-size="attribute.fontSize" | 
|  |  | 33 | +              line-height="0" | 
|  |  | 34 | +              :fill="attribute.fontColor" | 
|  |  | 35 | +              opacity="1" | 
|  |  | 36 | +              font-family="YouSheBiaoTiHei" | 
|  |  | 37 | +              letter-spacing="0" | 
|  |  | 38 | +            > | 
|  |  | 39 | +              {{ dataset }} | 
|  |  | 40 | +            </tspan> | 
|  |  | 41 | +          </text> | 
|  |  | 42 | +        </g> | 
|  |  | 43 | +        <path | 
|  |  | 44 | +          id="路径 5" | 
|  |  | 45 | +          style="stroke: url(#linear_1); stroke-width: 1; stroke-opacity: 100; stroke-dasharray: 0 0" | 
|  |  | 46 | +          transform="translate(6.249999895402425e-8 30)  rotate(0 160 0)" | 
|  |  | 47 | +          d="M0,0L320,0 " | 
|  |  | 48 | +        /> | 
|  |  | 49 | +        <path | 
|  |  | 50 | +          id="路径 5" | 
|  |  | 51 | +          style="stroke: url(#linear_2); stroke-width: 1; stroke-opacity: 100; stroke-dasharray: 0 0" | 
|  |  | 52 | +          transform="translate(6.249999895402425e-8 0)  rotate(0 160 0)" | 
|  |  | 53 | +          d="M0,0L320,0 " | 
|  |  | 54 | +        /> | 
|  |  | 55 | +        <path | 
|  |  | 56 | +          id="路径 5" | 
|  |  | 57 | +          :style="{ stroke: attribute.linearColors[10], strokeWidth: 1, strokeOpacity: 1, strokeDasharray: 0 }" | 
|  |  | 58 | +          transform="translate(0 0.0005)  rotate(0 2.000000062499999 0)" | 
|  |  | 59 | +          d="M0,0L4,0 " | 
|  |  | 60 | +        /> | 
|  |  | 61 | +        <path | 
|  |  | 62 | +          id="路径 5" | 
|  |  | 63 | +          :style="{ stroke: attribute.linearColors[11], strokeWidth: 1, strokeOpacity: 1, strokeDasharray: 0 }" | 
|  |  | 64 | +          :transform="`translate(0 ${h - 1})  rotate(0 2.000000062499999 0)`" | 
|  |  | 65 | +          d="M0,0 L4,0 " | 
|  |  | 66 | +        /> | 
|  |  | 67 | +        <g opacity="1" :transform="`translate(10.0000000625 ${h / 2 - 18 / 2})  rotate(0 8.598076211353316 9)`"> | 
|  |  | 68 | +          <path | 
|  |  | 69 | +            id="三角形 1" | 
|  |  | 70 | +            fill-rule="evenodd" | 
|  |  | 71 | +            :style="{ fill: attribute.linearColors[6] }" | 
|  |  | 72 | +            transform="translate(4 0)  rotate(0 6.598076211353316 4.5)" | 
|  |  | 73 | +            opacity="1" | 
|  |  | 74 | +            d="M2.8,9L13.2,9L0,0L2.8,9Z " | 
|  |  | 75 | +          /> | 
|  |  | 76 | +          <path | 
|  |  | 77 | +            id="三角形 1" | 
|  |  | 78 | +            fill-rule="evenodd" | 
|  |  | 79 | +            :style="{ fill: attribute.linearColors[7] }" | 
|  |  | 80 | +            transform="translate(4 9)  rotate(0 6.598076211353316 4.5)" | 
|  |  | 81 | +            opacity="1" | 
|  |  | 82 | +            d="M13.2,0L2.8,0L0,9L13.2,0Z " | 
|  |  | 83 | +          /> | 
|  |  | 84 | +          <path | 
|  |  | 85 | +            id="圆形 7" | 
|  |  | 86 | +            fill-rule="evenodd" | 
|  |  | 87 | +            :style="{ fill: attribute.linearColors[8] }" | 
|  |  | 88 | +            transform="translate(0 7)  rotate(0 2 2)" | 
|  |  | 89 | +            opacity="1" | 
|  |  | 90 | +            d="M2,0C0.9,0 0,0.9 0,2C0,3.1 0.9,4 2,4C3.1,4 4,3.1 4,2C4,0.9 3.1,0 2,0Z " | 
|  |  | 91 | +          /> | 
|  |  | 92 | +        </g> | 
|  |  | 93 | +        <path | 
|  |  | 94 | +          id="矩形 17" | 
|  |  | 95 | +          fill-rule="evenodd" | 
|  |  | 96 | +          :style="{ fill: attribute.linearColors[9] }" | 
|  |  | 97 | +          transform="translate(6.249999895402425e-8 2)  rotate(0 0.5 13)" | 
|  |  | 98 | +          opacity="1" | 
|  |  | 99 | +          :d="`M0,${h - 5}L1,${h - 5}L1,0L0,0L0,${h - 5}Z`" | 
|  |  | 100 | +        /> | 
|  |  | 101 | +      </g> | 
|  |  | 102 | +    </svg> | 
|  |  | 103 | +  </div> | 
|  |  | 104 | +</template> | 
|  |  | 105 | +<script setup lang="ts"> | 
|  |  | 106 | +import { PropType, toRefs } from 'vue' | 
|  |  | 107 | +import { CreateComponentType } from '@/packages/index.d' | 
|  |  | 108 | + | 
|  |  | 109 | +const props = defineProps({ | 
|  |  | 110 | +  chartConfig: { | 
|  |  | 111 | +    type: Object as PropType<CreateComponentType>, | 
|  |  | 112 | +    required: true | 
|  |  | 113 | +  } | 
|  |  | 114 | +}) | 
|  |  | 115 | + | 
|  |  | 116 | +const { dataset, attribute } = toRefs(props.chartConfig.option) | 
|  |  | 117 | + | 
|  |  | 118 | +const { w, h } = toRefs(props.chartConfig.attr) | 
|  |  | 119 | +</script> | 
|  |  | 120 | + | 
|  |  | 121 | +<style lang="scss" scoped> | 
|  |  | 122 | +.go-content-box { | 
|  |  | 123 | +  width: v-bind('w+"px"'); | 
|  |  | 124 | +  height: v-bind('h+"px"'); | 
|  |  | 125 | +  display: flex; | 
|  |  | 126 | +  align-items: center; | 
|  |  | 127 | +  justify-content: center; | 
|  |  | 128 | +} | 
|  |  | 129 | +</style> |