[{"data":1,"prerenderedAt":1960,"buildId":1961},["ShallowReactive",2],{"-docs-composables-use-sigma-label-tiers-description":3,"component-example-useSigmaLabelTiersExample":16,"component-example-useSigmaLabelTiersExampletdCNQ6226iiZKNkds9W7nqV771lTw8VEX0JmHKG7zWU":20,"docs--docs-composables-use-sigma-label-tiers":1465,"docs-navigation-zh-CN":1714,"mdc--kyryde-key":1941,"surround--docs-composables-use-sigma-label-tiers":1957},{"data":4,"body":5},{},{"type":6,"children":7},"root",[8],{"type":9,"tag":10,"props":11,"children":12},"element","p",{},[13],{"type":14,"value":15},"text","按相机比例分级显示标签，视野越广只留下越重要的那几档。",{"code":17,"filePath":18,"pascalName":19},"\u003Cscript setup lang=\"ts\">\nimport Graph from 'graphology'\nimport type { StylesDeclaration } from 'sigma\u002Ftypes'\n\nconst props = defineProps\u003C{ breakpoints: string }>()\n\nconst { data: dataset } = await useFetch('\u002Fapi\u002Fwikipedia.json', { server: false })\n\nconst graph = computed(() => {\n  if (!dataset.value) {\n    return null\n  }\n\n  const instance = new Graph()\n  instance.import(dataset.value.data)\n\n  for (const [node, tier] of Object.entries(degreeToTier(instance))) {\n    instance.setNodeAttribute(node, 'labelTier', tier)\n  }\n\n  return instance\n})\n\nconst parsed = computed(() =>\n  props.breakpoints.split('\u002F').map((ratio, index) => [Number(ratio), index] as const)\n)\n\nconst styles = computed\u003CStylesDeclaration>(() => ({\n  nodes: {\n    color: { attribute: 'cluster', dict: dataset.value?.clusterColors ?? {}, defaultValue: '#94a3b8' },\n    size: {\n      attribute: 'score',\n      min: 4,\n      max: 18,\n      minValue: dataset.value?.scoreExtent[0],\n      maxValue: dataset.value?.scoreExtent[1]\n    },\n    labelSize: { attribute: 'labelTier', dict: { 0: 14, 1: 12, 2: 11 }, defaultValue: 12 },\n    labelColor: { attribute: 'labelTier', dict: { 0: '#0f172a', 1: '#1e293b', 2: '#64748b' }, defaultValue: '#1e293b' }\n  }\n}))\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSigmaGraph\n    v-if=\"graph\"\n    :graph=\"graph\"\n    :styles=\"styles\"\n    :settings=\"{ itemSizesReference: 'screen', hideEdgesOnMove: true, renderEdgeLabels: false }\"\n  >\n    \u003CUseSigmaLabelTiersPanel :key=\"breakpoints\" :breakpoints=\"parsed\" \u002F>\n  \u003C\u002FSigmaGraph>\n\u003C\u002Ftemplate>\n","\u002Fopt\u002Fbuildhome\u002Frepo\u002Fdocs\u002Fapp\u002Fcomponents\u002Fcontent\u002Fexamples\u002FUseSigmaLabelTiersExample.vue","UseSigmaLabelTiersExample",{"data":21,"body":23,"toc":1463},{"title":22,"description":22},"",{"type":6,"children":24},[25,1457],{"type":9,"tag":26,"props":27,"children":31},"pre",{"className":28,"code":29,"language":30,"meta":22,"style":22},"language-vue shiki shiki-themes github-light github-light github-dark","\u003Cscript setup lang=\"ts\">\nimport Graph from 'graphology'\nimport type { StylesDeclaration } from 'sigma\u002Ftypes'\n\nconst props = defineProps\u003C{ breakpoints: string }>()\n\nconst { data: dataset } = await useFetch('\u002Fapi\u002Fwikipedia.json', { server: false })\n\nconst graph = computed(() => {\n  if (!dataset.value) {\n    return null\n  }\n\n  const instance = new Graph()\n  instance.import(dataset.value.data)\n\n  for (const [node, tier] of Object.entries(degreeToTier(instance))) {\n    instance.setNodeAttribute(node, 'labelTier', tier)\n  }\n\n  return instance\n})\n\nconst parsed = computed(() =>\n  props.breakpoints.split('\u002F').map((ratio, index) => [Number(ratio), index] as const)\n)\n\nconst styles = computed\u003CStylesDeclaration>(() => ({\n  nodes: {\n    color: { attribute: 'cluster', dict: dataset.value?.clusterColors ?? {}, defaultValue: '#94a3b8' },\n    size: {\n      attribute: 'score',\n      min: 4,\n      max: 18,\n      minValue: dataset.value?.scoreExtent[0],\n      maxValue: dataset.value?.scoreExtent[1]\n    },\n    labelSize: { attribute: 'labelTier', dict: { 0: 14, 1: 12, 2: 11 }, defaultValue: 12 },\n    labelColor: { attribute: 'labelTier', dict: { 0: '#0f172a', 1: '#1e293b', 2: '#64748b' }, defaultValue: '#1e293b' }\n  }\n}))\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CSigmaGraph\n    v-if=\"graph\"\n    :graph=\"graph\"\n    :styles=\"styles\"\n    :settings=\"{ itemSizesReference: 'screen', hideEdgesOnMove: true, renderEdgeLabels: false }\"\n  >\n    \u003CUseSigmaLabelTiersPanel :key=\"breakpoints\" :breakpoints=\"parsed\" \u002F>\n  \u003C\u002FSigmaGraph>\n\u003C\u002Ftemplate>\n\n","vue",[32],{"type":9,"tag":33,"props":34,"children":35},"code",{"__ignoreMap":22},[36,81,106,133,143,194,202,274,282,319,343,357,366,374,407,425,433,504,533,541,549,563,572,580,610,700,708,716,760,769,820,829,848,866,884,903,922,931,1010,1126,1134,1143,1160,1168,1185,1199,1227,1256,1285,1344,1353,1423,1441],{"type":9,"tag":37,"props":38,"children":41},"span",{"class":39,"line":40},"line",1,[42,48,54,60,65,70,76],{"type":9,"tag":37,"props":43,"children":45},{"style":44},"--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8",[46],{"type":14,"value":47},"\u003C",{"type":9,"tag":37,"props":49,"children":51},{"style":50},"--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D",[52],{"type":14,"value":53},"script",{"type":9,"tag":37,"props":55,"children":57},{"style":56},"--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0",[58],{"type":14,"value":59}," setup",{"type":9,"tag":37,"props":61,"children":62},{"style":56},[63],{"type":14,"value":64}," lang",{"type":9,"tag":37,"props":66,"children":67},{"style":44},[68],{"type":14,"value":69},"=",{"type":9,"tag":37,"props":71,"children":73},{"style":72},"--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF",[74],{"type":14,"value":75},"\"ts\"",{"type":9,"tag":37,"props":77,"children":78},{"style":44},[79],{"type":14,"value":80},">\n",{"type":9,"tag":37,"props":82,"children":84},{"class":39,"line":83},2,[85,91,96,101],{"type":9,"tag":37,"props":86,"children":88},{"style":87},"--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583",[89],{"type":14,"value":90},"import",{"type":9,"tag":37,"props":92,"children":93},{"style":44},[94],{"type":14,"value":95}," Graph ",{"type":9,"tag":37,"props":97,"children":98},{"style":87},[99],{"type":14,"value":100},"from",{"type":9,"tag":37,"props":102,"children":103},{"style":72},[104],{"type":14,"value":105}," 'graphology'\n",{"type":9,"tag":37,"props":107,"children":109},{"class":39,"line":108},3,[110,114,119,124,128],{"type":9,"tag":37,"props":111,"children":112},{"style":87},[113],{"type":14,"value":90},{"type":9,"tag":37,"props":115,"children":116},{"style":87},[117],{"type":14,"value":118}," type",{"type":9,"tag":37,"props":120,"children":121},{"style":44},[122],{"type":14,"value":123}," { StylesDeclaration } ",{"type":9,"tag":37,"props":125,"children":126},{"style":87},[127],{"type":14,"value":100},{"type":9,"tag":37,"props":129,"children":130},{"style":72},[131],{"type":14,"value":132}," 'sigma\u002Ftypes'\n",{"type":9,"tag":37,"props":134,"children":136},{"class":39,"line":135},4,[137],{"type":9,"tag":37,"props":138,"children":140},{"emptyLinePlaceholder":139},true,[141],{"type":14,"value":142},"\n",{"type":9,"tag":37,"props":144,"children":146},{"class":39,"line":145},5,[147,152,158,163,168,173,179,184,189],{"type":9,"tag":37,"props":148,"children":149},{"style":87},[150],{"type":14,"value":151},"const",{"type":9,"tag":37,"props":153,"children":155},{"style":154},"--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF",[156],{"type":14,"value":157}," props",{"type":9,"tag":37,"props":159,"children":160},{"style":87},[161],{"type":14,"value":162}," =",{"type":9,"tag":37,"props":164,"children":165},{"style":56},[166],{"type":14,"value":167}," defineProps",{"type":9,"tag":37,"props":169,"children":170},{"style":44},[171],{"type":14,"value":172},"\u003C{ ",{"type":9,"tag":37,"props":174,"children":176},{"style":175},"--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70",[177],{"type":14,"value":178},"breakpoints",{"type":9,"tag":37,"props":180,"children":181},{"style":87},[182],{"type":14,"value":183},":",{"type":9,"tag":37,"props":185,"children":186},{"style":154},[187],{"type":14,"value":188}," string",{"type":9,"tag":37,"props":190,"children":191},{"style":44},[192],{"type":14,"value":193}," }>()\n",{"type":9,"tag":37,"props":195,"children":197},{"class":39,"line":196},6,[198],{"type":9,"tag":37,"props":199,"children":200},{"emptyLinePlaceholder":139},[201],{"type":14,"value":142},{"type":9,"tag":37,"props":203,"children":205},{"class":39,"line":204},7,[206,210,215,220,225,230,235,239,244,249,254,259,264,269],{"type":9,"tag":37,"props":207,"children":208},{"style":87},[209],{"type":14,"value":151},{"type":9,"tag":37,"props":211,"children":212},{"style":44},[213],{"type":14,"value":214}," { ",{"type":9,"tag":37,"props":216,"children":217},{"style":175},[218],{"type":14,"value":219},"data",{"type":9,"tag":37,"props":221,"children":222},{"style":44},[223],{"type":14,"value":224},": ",{"type":9,"tag":37,"props":226,"children":227},{"style":154},[228],{"type":14,"value":229},"dataset",{"type":9,"tag":37,"props":231,"children":232},{"style":44},[233],{"type":14,"value":234}," } ",{"type":9,"tag":37,"props":236,"children":237},{"style":87},[238],{"type":14,"value":69},{"type":9,"tag":37,"props":240,"children":241},{"style":87},[242],{"type":14,"value":243}," await",{"type":9,"tag":37,"props":245,"children":246},{"style":56},[247],{"type":14,"value":248}," useFetch",{"type":9,"tag":37,"props":250,"children":251},{"style":44},[252],{"type":14,"value":253},"(",{"type":9,"tag":37,"props":255,"children":256},{"style":72},[257],{"type":14,"value":258},"'\u002Fapi\u002Fwikipedia.json'",{"type":9,"tag":37,"props":260,"children":261},{"style":44},[262],{"type":14,"value":263},", { server: ",{"type":9,"tag":37,"props":265,"children":266},{"style":154},[267],{"type":14,"value":268},"false",{"type":9,"tag":37,"props":270,"children":271},{"style":44},[272],{"type":14,"value":273}," })\n",{"type":9,"tag":37,"props":275,"children":277},{"class":39,"line":276},8,[278],{"type":9,"tag":37,"props":279,"children":280},{"emptyLinePlaceholder":139},[281],{"type":14,"value":142},{"type":9,"tag":37,"props":283,"children":285},{"class":39,"line":284},9,[286,290,295,299,304,309,314],{"type":9,"tag":37,"props":287,"children":288},{"style":87},[289],{"type":14,"value":151},{"type":9,"tag":37,"props":291,"children":292},{"style":154},[293],{"type":14,"value":294}," graph",{"type":9,"tag":37,"props":296,"children":297},{"style":87},[298],{"type":14,"value":162},{"type":9,"tag":37,"props":300,"children":301},{"style":56},[302],{"type":14,"value":303}," computed",{"type":9,"tag":37,"props":305,"children":306},{"style":44},[307],{"type":14,"value":308},"(() ",{"type":9,"tag":37,"props":310,"children":311},{"style":87},[312],{"type":14,"value":313},"=>",{"type":9,"tag":37,"props":315,"children":316},{"style":44},[317],{"type":14,"value":318}," {\n",{"type":9,"tag":37,"props":320,"children":322},{"class":39,"line":321},10,[323,328,333,338],{"type":9,"tag":37,"props":324,"children":325},{"style":87},[326],{"type":14,"value":327},"  if",{"type":9,"tag":37,"props":329,"children":330},{"style":44},[331],{"type":14,"value":332}," (",{"type":9,"tag":37,"props":334,"children":335},{"style":87},[336],{"type":14,"value":337},"!",{"type":9,"tag":37,"props":339,"children":340},{"style":44},[341],{"type":14,"value":342},"dataset.value) {\n",{"type":9,"tag":37,"props":344,"children":346},{"class":39,"line":345},11,[347,352],{"type":9,"tag":37,"props":348,"children":349},{"style":87},[350],{"type":14,"value":351},"    return",{"type":9,"tag":37,"props":353,"children":354},{"style":154},[355],{"type":14,"value":356}," null\n",{"type":9,"tag":37,"props":358,"children":360},{"class":39,"line":359},12,[361],{"type":9,"tag":37,"props":362,"children":363},{"style":44},[364],{"type":14,"value":365},"  }\n",{"type":9,"tag":37,"props":367,"children":369},{"class":39,"line":368},13,[370],{"type":9,"tag":37,"props":371,"children":372},{"emptyLinePlaceholder":139},[373],{"type":14,"value":142},{"type":9,"tag":37,"props":375,"children":377},{"class":39,"line":376},14,[378,383,388,392,397,402],{"type":9,"tag":37,"props":379,"children":380},{"style":87},[381],{"type":14,"value":382},"  const",{"type":9,"tag":37,"props":384,"children":385},{"style":154},[386],{"type":14,"value":387}," instance",{"type":9,"tag":37,"props":389,"children":390},{"style":87},[391],{"type":14,"value":162},{"type":9,"tag":37,"props":393,"children":394},{"style":87},[395],{"type":14,"value":396}," new",{"type":9,"tag":37,"props":398,"children":399},{"style":56},[400],{"type":14,"value":401}," Graph",{"type":9,"tag":37,"props":403,"children":404},{"style":44},[405],{"type":14,"value":406},"()\n",{"type":9,"tag":37,"props":408,"children":410},{"class":39,"line":409},15,[411,416,420],{"type":9,"tag":37,"props":412,"children":413},{"style":44},[414],{"type":14,"value":415},"  instance.",{"type":9,"tag":37,"props":417,"children":418},{"style":56},[419],{"type":14,"value":90},{"type":9,"tag":37,"props":421,"children":422},{"style":44},[423],{"type":14,"value":424},"(dataset.value.data)\n",{"type":9,"tag":37,"props":426,"children":428},{"class":39,"line":427},16,[429],{"type":9,"tag":37,"props":430,"children":431},{"emptyLinePlaceholder":139},[432],{"type":14,"value":142},{"type":9,"tag":37,"props":434,"children":436},{"class":39,"line":435},17,[437,442,446,450,455,460,465,470,475,480,485,490,494,499],{"type":9,"tag":37,"props":438,"children":439},{"style":87},[440],{"type":14,"value":441},"  for",{"type":9,"tag":37,"props":443,"children":444},{"style":44},[445],{"type":14,"value":332},{"type":9,"tag":37,"props":447,"children":448},{"style":87},[449],{"type":14,"value":151},{"type":9,"tag":37,"props":451,"children":452},{"style":44},[453],{"type":14,"value":454}," [",{"type":9,"tag":37,"props":456,"children":457},{"style":154},[458],{"type":14,"value":459},"node",{"type":9,"tag":37,"props":461,"children":462},{"style":44},[463],{"type":14,"value":464},", ",{"type":9,"tag":37,"props":466,"children":467},{"style":154},[468],{"type":14,"value":469},"tier",{"type":9,"tag":37,"props":471,"children":472},{"style":44},[473],{"type":14,"value":474},"] ",{"type":9,"tag":37,"props":476,"children":477},{"style":87},[478],{"type":14,"value":479},"of",{"type":9,"tag":37,"props":481,"children":482},{"style":44},[483],{"type":14,"value":484}," Object.",{"type":9,"tag":37,"props":486,"children":487},{"style":56},[488],{"type":14,"value":489},"entries",{"type":9,"tag":37,"props":491,"children":492},{"style":44},[493],{"type":14,"value":253},{"type":9,"tag":37,"props":495,"children":496},{"style":56},[497],{"type":14,"value":498},"degreeToTier",{"type":9,"tag":37,"props":500,"children":501},{"style":44},[502],{"type":14,"value":503},"(instance))) {\n",{"type":9,"tag":37,"props":505,"children":507},{"class":39,"line":506},18,[508,513,518,523,528],{"type":9,"tag":37,"props":509,"children":510},{"style":44},[511],{"type":14,"value":512},"    instance.",{"type":9,"tag":37,"props":514,"children":515},{"style":56},[516],{"type":14,"value":517},"setNodeAttribute",{"type":9,"tag":37,"props":519,"children":520},{"style":44},[521],{"type":14,"value":522},"(node, ",{"type":9,"tag":37,"props":524,"children":525},{"style":72},[526],{"type":14,"value":527},"'labelTier'",{"type":9,"tag":37,"props":529,"children":530},{"style":44},[531],{"type":14,"value":532},", tier)\n",{"type":9,"tag":37,"props":534,"children":536},{"class":39,"line":535},19,[537],{"type":9,"tag":37,"props":538,"children":539},{"style":44},[540],{"type":14,"value":365},{"type":9,"tag":37,"props":542,"children":544},{"class":39,"line":543},20,[545],{"type":9,"tag":37,"props":546,"children":547},{"emptyLinePlaceholder":139},[548],{"type":14,"value":142},{"type":9,"tag":37,"props":550,"children":552},{"class":39,"line":551},21,[553,558],{"type":9,"tag":37,"props":554,"children":555},{"style":87},[556],{"type":14,"value":557},"  return",{"type":9,"tag":37,"props":559,"children":560},{"style":44},[561],{"type":14,"value":562}," instance\n",{"type":9,"tag":37,"props":564,"children":566},{"class":39,"line":565},22,[567],{"type":9,"tag":37,"props":568,"children":569},{"style":44},[570],{"type":14,"value":571},"})\n",{"type":9,"tag":37,"props":573,"children":575},{"class":39,"line":574},23,[576],{"type":9,"tag":37,"props":577,"children":578},{"emptyLinePlaceholder":139},[579],{"type":14,"value":142},{"type":9,"tag":37,"props":581,"children":583},{"class":39,"line":582},24,[584,588,593,597,601,605],{"type":9,"tag":37,"props":585,"children":586},{"style":87},[587],{"type":14,"value":151},{"type":9,"tag":37,"props":589,"children":590},{"style":154},[591],{"type":14,"value":592}," parsed",{"type":9,"tag":37,"props":594,"children":595},{"style":87},[596],{"type":14,"value":162},{"type":9,"tag":37,"props":598,"children":599},{"style":56},[600],{"type":14,"value":303},{"type":9,"tag":37,"props":602,"children":603},{"style":44},[604],{"type":14,"value":308},{"type":9,"tag":37,"props":606,"children":607},{"style":87},[608],{"type":14,"value":609},"=>\n",{"type":9,"tag":37,"props":611,"children":613},{"class":39,"line":612},25,[614,619,624,628,633,638,643,648,653,657,662,667,671,675,680,685,690,695],{"type":9,"tag":37,"props":615,"children":616},{"style":44},[617],{"type":14,"value":618},"  props.breakpoints.",{"type":9,"tag":37,"props":620,"children":621},{"style":56},[622],{"type":14,"value":623},"split",{"type":9,"tag":37,"props":625,"children":626},{"style":44},[627],{"type":14,"value":253},{"type":9,"tag":37,"props":629,"children":630},{"style":72},[631],{"type":14,"value":632},"'\u002F'",{"type":9,"tag":37,"props":634,"children":635},{"style":44},[636],{"type":14,"value":637},").",{"type":9,"tag":37,"props":639,"children":640},{"style":56},[641],{"type":14,"value":642},"map",{"type":9,"tag":37,"props":644,"children":645},{"style":44},[646],{"type":14,"value":647},"((",{"type":9,"tag":37,"props":649,"children":650},{"style":175},[651],{"type":14,"value":652},"ratio",{"type":9,"tag":37,"props":654,"children":655},{"style":44},[656],{"type":14,"value":464},{"type":9,"tag":37,"props":658,"children":659},{"style":175},[660],{"type":14,"value":661},"index",{"type":9,"tag":37,"props":663,"children":664},{"style":44},[665],{"type":14,"value":666},") ",{"type":9,"tag":37,"props":668,"children":669},{"style":87},[670],{"type":14,"value":313},{"type":9,"tag":37,"props":672,"children":673},{"style":44},[674],{"type":14,"value":454},{"type":9,"tag":37,"props":676,"children":677},{"style":56},[678],{"type":14,"value":679},"Number",{"type":9,"tag":37,"props":681,"children":682},{"style":44},[683],{"type":14,"value":684},"(ratio), index] ",{"type":9,"tag":37,"props":686,"children":687},{"style":87},[688],{"type":14,"value":689},"as",{"type":9,"tag":37,"props":691,"children":692},{"style":87},[693],{"type":14,"value":694}," const",{"type":9,"tag":37,"props":696,"children":697},{"style":44},[698],{"type":14,"value":699},")\n",{"type":9,"tag":37,"props":701,"children":703},{"class":39,"line":702},26,[704],{"type":9,"tag":37,"props":705,"children":706},{"style":44},[707],{"type":14,"value":699},{"type":9,"tag":37,"props":709,"children":711},{"class":39,"line":710},27,[712],{"type":9,"tag":37,"props":713,"children":714},{"emptyLinePlaceholder":139},[715],{"type":14,"value":142},{"type":9,"tag":37,"props":717,"children":719},{"class":39,"line":718},28,[720,724,729,733,737,741,746,751,755],{"type":9,"tag":37,"props":721,"children":722},{"style":87},[723],{"type":14,"value":151},{"type":9,"tag":37,"props":725,"children":726},{"style":154},[727],{"type":14,"value":728}," styles",{"type":9,"tag":37,"props":730,"children":731},{"style":87},[732],{"type":14,"value":162},{"type":9,"tag":37,"props":734,"children":735},{"style":56},[736],{"type":14,"value":303},{"type":9,"tag":37,"props":738,"children":739},{"style":44},[740],{"type":14,"value":47},{"type":9,"tag":37,"props":742,"children":743},{"style":56},[744],{"type":14,"value":745},"StylesDeclaration",{"type":9,"tag":37,"props":747,"children":748},{"style":44},[749],{"type":14,"value":750},">(() ",{"type":9,"tag":37,"props":752,"children":753},{"style":87},[754],{"type":14,"value":313},{"type":9,"tag":37,"props":756,"children":757},{"style":44},[758],{"type":14,"value":759}," ({\n",{"type":9,"tag":37,"props":761,"children":763},{"class":39,"line":762},29,[764],{"type":9,"tag":37,"props":765,"children":766},{"style":44},[767],{"type":14,"value":768},"  nodes: {\n",{"type":9,"tag":37,"props":770,"children":772},{"class":39,"line":771},30,[773,778,783,788,793,798,803,811,815],{"type":9,"tag":37,"props":774,"children":775},{"style":44},[776],{"type":14,"value":777},"    color: { attribute: ",{"type":9,"tag":37,"props":779,"children":780},{"style":72},[781],{"type":14,"value":782},"'cluster'",{"type":9,"tag":37,"props":784,"children":785},{"style":44},[786],{"type":14,"value":787},", dict: dataset.value?.clusterColors ",{"type":9,"tag":37,"props":789,"children":790},{"style":87},[791],{"type":14,"value":792},"??",{"type":9,"tag":37,"props":794,"children":795},{"style":44},[796],{"type":14,"value":797}," {}, defaultValue: ",{"type":9,"tag":37,"props":799,"children":800},{"style":72},[801],{"type":14,"value":802},"'",{"type":9,"tag":37,"props":804,"children":808},{"style":805,"class":806},"background-color:#94a3b8;color:#000000;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[807],"shiki-color-highlight",[809],{"type":14,"value":810},"#94a3b8",{"type":9,"tag":37,"props":812,"children":813},{"style":72},[814],{"type":14,"value":802},{"type":9,"tag":37,"props":816,"children":817},{"style":44},[818],{"type":14,"value":819}," },\n",{"type":9,"tag":37,"props":821,"children":823},{"class":39,"line":822},31,[824],{"type":9,"tag":37,"props":825,"children":826},{"style":44},[827],{"type":14,"value":828},"    size: {\n",{"type":9,"tag":37,"props":830,"children":832},{"class":39,"line":831},32,[833,838,843],{"type":9,"tag":37,"props":834,"children":835},{"style":44},[836],{"type":14,"value":837},"      attribute: ",{"type":9,"tag":37,"props":839,"children":840},{"style":72},[841],{"type":14,"value":842},"'score'",{"type":9,"tag":37,"props":844,"children":845},{"style":44},[846],{"type":14,"value":847},",\n",{"type":9,"tag":37,"props":849,"children":851},{"class":39,"line":850},33,[852,857,862],{"type":9,"tag":37,"props":853,"children":854},{"style":44},[855],{"type":14,"value":856},"      min: ",{"type":9,"tag":37,"props":858,"children":859},{"style":154},[860],{"type":14,"value":861},"4",{"type":9,"tag":37,"props":863,"children":864},{"style":44},[865],{"type":14,"value":847},{"type":9,"tag":37,"props":867,"children":869},{"class":39,"line":868},34,[870,875,880],{"type":9,"tag":37,"props":871,"children":872},{"style":44},[873],{"type":14,"value":874},"      max: ",{"type":9,"tag":37,"props":876,"children":877},{"style":154},[878],{"type":14,"value":879},"18",{"type":9,"tag":37,"props":881,"children":882},{"style":44},[883],{"type":14,"value":847},{"type":9,"tag":37,"props":885,"children":887},{"class":39,"line":886},35,[888,893,898],{"type":9,"tag":37,"props":889,"children":890},{"style":44},[891],{"type":14,"value":892},"      minValue: dataset.value?.scoreExtent[",{"type":9,"tag":37,"props":894,"children":895},{"style":154},[896],{"type":14,"value":897},"0",{"type":9,"tag":37,"props":899,"children":900},{"style":44},[901],{"type":14,"value":902},"],\n",{"type":9,"tag":37,"props":904,"children":906},{"class":39,"line":905},36,[907,912,917],{"type":9,"tag":37,"props":908,"children":909},{"style":44},[910],{"type":14,"value":911},"      maxValue: dataset.value?.scoreExtent[",{"type":9,"tag":37,"props":913,"children":914},{"style":154},[915],{"type":14,"value":916},"1",{"type":9,"tag":37,"props":918,"children":919},{"style":44},[920],{"type":14,"value":921},"]\n",{"type":9,"tag":37,"props":923,"children":925},{"class":39,"line":924},37,[926],{"type":9,"tag":37,"props":927,"children":928},{"style":44},[929],{"type":14,"value":930},"    },\n",{"type":9,"tag":37,"props":932,"children":934},{"class":39,"line":933},38,[935,940,944,949,953,957,962,966,970,974,979,983,988,992,997,1002,1006],{"type":9,"tag":37,"props":936,"children":937},{"style":44},[938],{"type":14,"value":939},"    labelSize: { attribute: ",{"type":9,"tag":37,"props":941,"children":942},{"style":72},[943],{"type":14,"value":527},{"type":9,"tag":37,"props":945,"children":946},{"style":44},[947],{"type":14,"value":948},", dict: { ",{"type":9,"tag":37,"props":950,"children":951},{"style":154},[952],{"type":14,"value":897},{"type":9,"tag":37,"props":954,"children":955},{"style":44},[956],{"type":14,"value":224},{"type":9,"tag":37,"props":958,"children":959},{"style":154},[960],{"type":14,"value":961},"14",{"type":9,"tag":37,"props":963,"children":964},{"style":44},[965],{"type":14,"value":464},{"type":9,"tag":37,"props":967,"children":968},{"style":154},[969],{"type":14,"value":916},{"type":9,"tag":37,"props":971,"children":972},{"style":44},[973],{"type":14,"value":224},{"type":9,"tag":37,"props":975,"children":976},{"style":154},[977],{"type":14,"value":978},"12",{"type":9,"tag":37,"props":980,"children":981},{"style":44},[982],{"type":14,"value":464},{"type":9,"tag":37,"props":984,"children":985},{"style":154},[986],{"type":14,"value":987},"2",{"type":9,"tag":37,"props":989,"children":990},{"style":44},[991],{"type":14,"value":224},{"type":9,"tag":37,"props":993,"children":994},{"style":154},[995],{"type":14,"value":996},"11",{"type":9,"tag":37,"props":998,"children":999},{"style":44},[1000],{"type":14,"value":1001}," }, defaultValue: ",{"type":9,"tag":37,"props":1003,"children":1004},{"style":154},[1005],{"type":14,"value":978},{"type":9,"tag":37,"props":1007,"children":1008},{"style":44},[1009],{"type":14,"value":819},{"type":9,"tag":37,"props":1011,"children":1013},{"class":39,"line":1012},39,[1014,1019,1023,1027,1031,1035,1039,1046,1050,1054,1058,1062,1066,1073,1077,1081,1085,1089,1093,1100,1104,1108,1112,1117,1121],{"type":9,"tag":37,"props":1015,"children":1016},{"style":44},[1017],{"type":14,"value":1018},"    labelColor: { attribute: ",{"type":9,"tag":37,"props":1020,"children":1021},{"style":72},[1022],{"type":14,"value":527},{"type":9,"tag":37,"props":1024,"children":1025},{"style":44},[1026],{"type":14,"value":948},{"type":9,"tag":37,"props":1028,"children":1029},{"style":154},[1030],{"type":14,"value":897},{"type":9,"tag":37,"props":1032,"children":1033},{"style":44},[1034],{"type":14,"value":224},{"type":9,"tag":37,"props":1036,"children":1037},{"style":72},[1038],{"type":14,"value":802},{"type":9,"tag":37,"props":1040,"children":1043},{"style":1041,"class":1042},"background-color:#0f172a;color:#ffffff;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[807],[1044],{"type":14,"value":1045},"#0f172a",{"type":9,"tag":37,"props":1047,"children":1048},{"style":72},[1049],{"type":14,"value":802},{"type":9,"tag":37,"props":1051,"children":1052},{"style":44},[1053],{"type":14,"value":464},{"type":9,"tag":37,"props":1055,"children":1056},{"style":154},[1057],{"type":14,"value":916},{"type":9,"tag":37,"props":1059,"children":1060},{"style":44},[1061],{"type":14,"value":224},{"type":9,"tag":37,"props":1063,"children":1064},{"style":72},[1065],{"type":14,"value":802},{"type":9,"tag":37,"props":1067,"children":1070},{"style":1068,"class":1069},"background-color:#1e293b;color:#ffffff;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[807],[1071],{"type":14,"value":1072},"#1e293b",{"type":9,"tag":37,"props":1074,"children":1075},{"style":72},[1076],{"type":14,"value":802},{"type":9,"tag":37,"props":1078,"children":1079},{"style":44},[1080],{"type":14,"value":464},{"type":9,"tag":37,"props":1082,"children":1083},{"style":154},[1084],{"type":14,"value":987},{"type":9,"tag":37,"props":1086,"children":1087},{"style":44},[1088],{"type":14,"value":224},{"type":9,"tag":37,"props":1090,"children":1091},{"style":72},[1092],{"type":14,"value":802},{"type":9,"tag":37,"props":1094,"children":1097},{"style":1095,"class":1096},"background-color:#64748b;color:#000000;display:inline-block;padding:0 0.15em;margin:0 -0.15em;border-radius:0.2em",[807],[1098],{"type":14,"value":1099},"#64748b",{"type":9,"tag":37,"props":1101,"children":1102},{"style":72},[1103],{"type":14,"value":802},{"type":9,"tag":37,"props":1105,"children":1106},{"style":44},[1107],{"type":14,"value":1001},{"type":9,"tag":37,"props":1109,"children":1110},{"style":72},[1111],{"type":14,"value":802},{"type":9,"tag":37,"props":1113,"children":1115},{"style":1068,"class":1114},[807],[1116],{"type":14,"value":1072},{"type":9,"tag":37,"props":1118,"children":1119},{"style":72},[1120],{"type":14,"value":802},{"type":9,"tag":37,"props":1122,"children":1123},{"style":44},[1124],{"type":14,"value":1125}," }\n",{"type":9,"tag":37,"props":1127,"children":1129},{"class":39,"line":1128},40,[1130],{"type":9,"tag":37,"props":1131,"children":1132},{"style":44},[1133],{"type":14,"value":365},{"type":9,"tag":37,"props":1135,"children":1137},{"class":39,"line":1136},41,[1138],{"type":9,"tag":37,"props":1139,"children":1140},{"style":44},[1141],{"type":14,"value":1142},"}))\n",{"type":9,"tag":37,"props":1144,"children":1146},{"class":39,"line":1145},42,[1147,1152,1156],{"type":9,"tag":37,"props":1148,"children":1149},{"style":44},[1150],{"type":14,"value":1151},"\u003C\u002F",{"type":9,"tag":37,"props":1153,"children":1154},{"style":50},[1155],{"type":14,"value":53},{"type":9,"tag":37,"props":1157,"children":1158},{"style":44},[1159],{"type":14,"value":80},{"type":9,"tag":37,"props":1161,"children":1163},{"class":39,"line":1162},43,[1164],{"type":9,"tag":37,"props":1165,"children":1166},{"emptyLinePlaceholder":139},[1167],{"type":14,"value":142},{"type":9,"tag":37,"props":1169,"children":1171},{"class":39,"line":1170},44,[1172,1176,1181],{"type":9,"tag":37,"props":1173,"children":1174},{"style":44},[1175],{"type":14,"value":47},{"type":9,"tag":37,"props":1177,"children":1178},{"style":50},[1179],{"type":14,"value":1180},"template",{"type":9,"tag":37,"props":1182,"children":1183},{"style":44},[1184],{"type":14,"value":80},{"type":9,"tag":37,"props":1186,"children":1188},{"class":39,"line":1187},45,[1189,1194],{"type":9,"tag":37,"props":1190,"children":1191},{"style":44},[1192],{"type":14,"value":1193},"  \u003C",{"type":9,"tag":37,"props":1195,"children":1196},{"style":50},[1197],{"type":14,"value":1198},"SigmaGraph\n",{"type":9,"tag":37,"props":1200,"children":1202},{"class":39,"line":1201},46,[1203,1208,1212,1217,1222],{"type":9,"tag":37,"props":1204,"children":1205},{"style":87},[1206],{"type":14,"value":1207},"    v-if",{"type":9,"tag":37,"props":1209,"children":1210},{"style":44},[1211],{"type":14,"value":69},{"type":9,"tag":37,"props":1213,"children":1214},{"style":72},[1215],{"type":14,"value":1216},"\"",{"type":9,"tag":37,"props":1218,"children":1219},{"style":44},[1220],{"type":14,"value":1221},"graph",{"type":9,"tag":37,"props":1223,"children":1224},{"style":72},[1225],{"type":14,"value":1226},"\"\n",{"type":9,"tag":37,"props":1228,"children":1230},{"class":39,"line":1229},47,[1231,1236,1240,1244,1248,1252],{"type":9,"tag":37,"props":1232,"children":1233},{"style":44},[1234],{"type":14,"value":1235},"    :",{"type":9,"tag":37,"props":1237,"children":1238},{"style":56},[1239],{"type":14,"value":1221},{"type":9,"tag":37,"props":1241,"children":1242},{"style":44},[1243],{"type":14,"value":69},{"type":9,"tag":37,"props":1245,"children":1246},{"style":72},[1247],{"type":14,"value":1216},{"type":9,"tag":37,"props":1249,"children":1250},{"style":44},[1251],{"type":14,"value":1221},{"type":9,"tag":37,"props":1253,"children":1254},{"style":72},[1255],{"type":14,"value":1226},{"type":9,"tag":37,"props":1257,"children":1259},{"class":39,"line":1258},48,[1260,1264,1269,1273,1277,1281],{"type":9,"tag":37,"props":1261,"children":1262},{"style":44},[1263],{"type":14,"value":1235},{"type":9,"tag":37,"props":1265,"children":1266},{"style":56},[1267],{"type":14,"value":1268},"styles",{"type":9,"tag":37,"props":1270,"children":1271},{"style":44},[1272],{"type":14,"value":69},{"type":9,"tag":37,"props":1274,"children":1275},{"style":72},[1276],{"type":14,"value":1216},{"type":9,"tag":37,"props":1278,"children":1279},{"style":44},[1280],{"type":14,"value":1268},{"type":9,"tag":37,"props":1282,"children":1283},{"style":72},[1284],{"type":14,"value":1226},{"type":9,"tag":37,"props":1286,"children":1288},{"class":39,"line":1287},49,[1289,1293,1298,1302,1306,1311,1316,1321,1326,1331,1335,1340],{"type":9,"tag":37,"props":1290,"children":1291},{"style":44},[1292],{"type":14,"value":1235},{"type":9,"tag":37,"props":1294,"children":1295},{"style":56},[1296],{"type":14,"value":1297},"settings",{"type":9,"tag":37,"props":1299,"children":1300},{"style":44},[1301],{"type":14,"value":69},{"type":9,"tag":37,"props":1303,"children":1304},{"style":72},[1305],{"type":14,"value":1216},{"type":9,"tag":37,"props":1307,"children":1308},{"style":44},[1309],{"type":14,"value":1310},"{ itemSizesReference: ",{"type":9,"tag":37,"props":1312,"children":1313},{"style":72},[1314],{"type":14,"value":1315},"'screen'",{"type":9,"tag":37,"props":1317,"children":1318},{"style":44},[1319],{"type":14,"value":1320},", hideEdgesOnMove: ",{"type":9,"tag":37,"props":1322,"children":1323},{"style":154},[1324],{"type":14,"value":1325},"true",{"type":9,"tag":37,"props":1327,"children":1328},{"style":44},[1329],{"type":14,"value":1330},", renderEdgeLabels: ",{"type":9,"tag":37,"props":1332,"children":1333},{"style":154},[1334],{"type":14,"value":268},{"type":9,"tag":37,"props":1336,"children":1337},{"style":44},[1338],{"type":14,"value":1339}," }",{"type":9,"tag":37,"props":1341,"children":1342},{"style":72},[1343],{"type":14,"value":1226},{"type":9,"tag":37,"props":1345,"children":1347},{"class":39,"line":1346},50,[1348],{"type":9,"tag":37,"props":1349,"children":1350},{"style":44},[1351],{"type":14,"value":1352},"  >\n",{"type":9,"tag":37,"props":1354,"children":1356},{"class":39,"line":1355},51,[1357,1362,1367,1372,1377,1381,1385,1389,1393,1397,1401,1405,1409,1414,1418],{"type":9,"tag":37,"props":1358,"children":1359},{"style":44},[1360],{"type":14,"value":1361},"    \u003C",{"type":9,"tag":37,"props":1363,"children":1364},{"style":50},[1365],{"type":14,"value":1366},"UseSigmaLabelTiersPanel",{"type":9,"tag":37,"props":1368,"children":1369},{"style":44},[1370],{"type":14,"value":1371}," :",{"type":9,"tag":37,"props":1373,"children":1374},{"style":56},[1375],{"type":14,"value":1376},"key",{"type":9,"tag":37,"props":1378,"children":1379},{"style":44},[1380],{"type":14,"value":69},{"type":9,"tag":37,"props":1382,"children":1383},{"style":72},[1384],{"type":14,"value":1216},{"type":9,"tag":37,"props":1386,"children":1387},{"style":44},[1388],{"type":14,"value":178},{"type":9,"tag":37,"props":1390,"children":1391},{"style":72},[1392],{"type":14,"value":1216},{"type":9,"tag":37,"props":1394,"children":1395},{"style":44},[1396],{"type":14,"value":1371},{"type":9,"tag":37,"props":1398,"children":1399},{"style":56},[1400],{"type":14,"value":178},{"type":9,"tag":37,"props":1402,"children":1403},{"style":44},[1404],{"type":14,"value":69},{"type":9,"tag":37,"props":1406,"children":1407},{"style":72},[1408],{"type":14,"value":1216},{"type":9,"tag":37,"props":1410,"children":1411},{"style":44},[1412],{"type":14,"value":1413},"parsed",{"type":9,"tag":37,"props":1415,"children":1416},{"style":72},[1417],{"type":14,"value":1216},{"type":9,"tag":37,"props":1419,"children":1420},{"style":44},[1421],{"type":14,"value":1422}," \u002F>\n",{"type":9,"tag":37,"props":1424,"children":1426},{"class":39,"line":1425},52,[1427,1432,1437],{"type":9,"tag":37,"props":1428,"children":1429},{"style":44},[1430],{"type":14,"value":1431},"  \u003C\u002F",{"type":9,"tag":37,"props":1433,"children":1434},{"style":50},[1435],{"type":14,"value":1436},"SigmaGraph",{"type":9,"tag":37,"props":1438,"children":1439},{"style":44},[1440],{"type":14,"value":80},{"type":9,"tag":37,"props":1442,"children":1444},{"class":39,"line":1443},53,[1445,1449,1453],{"type":9,"tag":37,"props":1446,"children":1447},{"style":44},[1448],{"type":14,"value":1151},{"type":9,"tag":37,"props":1450,"children":1451},{"style":50},[1452],{"type":14,"value":1180},{"type":9,"tag":37,"props":1454,"children":1455},{"style":44},[1456],{"type":14,"value":80},{"type":9,"tag":1458,"props":1459,"children":1460},"style",{},[1461],{"type":14,"value":1462},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":22,"searchDepth":83,"depth":83,"links":1464},[],{"id":1466,"title":1467,"body":1468,"category":1703,"description":15,"difficulty":1704,"extension":1705,"index":1706,"keywords":1704,"links":1704,"meta":1707,"navigation":1704,"path":1708,"requires":1704,"seo":1709,"sitemap":1711,"stem":1712,"__hash__":1713},"docs\u002Fdocs\u002F3.composables\u002F13.use-sigma-label-tiers.md","useSigmaLabelTiers",{"type":1469,"value":1470,"toc":1694},"minimark",[1471,1475,1486,1490,1539,1544,1556,1561,1571,1575,1579,1607,1613,1617,1647,1651,1661,1671,1691],[1472,1473,1474],"h2",{"id":1474},"用法",[10,1476,1477,1478,1485],{},"拉远之后节点变密，标签再全出就只剩噪声。档位先由 ",[1479,1480,1482],"a",{"href":1481},"\u002Fdocs\u002Futils\u002Fdegree-to-tier",[33,1483,1484],{},"degreeToTier()"," 写进属性，本 composable 只决定「当前该显示到哪一档」：",[1487,1488],"component-example",{":options":1489,"name":19},"[{\"name\":\"breakpoints\",\"label\":\"breakpoints\",\"items\":[\"2.6\u002F1.3\",\"1.8\u002F1.1\"],\"default\":\"2.6\u002F1.3\"}]",[26,1491,1495],{"className":1492,"code":1493,"language":1494,"meta":22,"style":22},"language-ts shiki shiki-themes github-light github-light github-dark","const { tier } = useSigmaLabelTiers({ breakpoints: [[2.6, 0], [1.3, 1]] })\n","ts",[33,1496,1497],{"__ignoreMap":22},[37,1498,1499,1502,1505,1508,1510,1512,1516,1519,1522,1524,1526,1529,1532,1534,1536],{"class":39,"line":40},[37,1500,151],{"class":1501},"s8jYJ",[37,1503,214],{"class":1504},"sxrX7",[37,1506,469],{"class":1507},"sBjJW",[37,1509,234],{"class":1504},[37,1511,69],{"class":1501},[37,1513,1515],{"class":1514},"snPdu"," useSigmaLabelTiers",[37,1517,1518],{"class":1504},"({ breakpoints: [[",[37,1520,1521],{"class":1507},"2.6",[37,1523,464],{"class":1504},[37,1525,897],{"class":1507},[37,1527,1528],{"class":1504},"], [",[37,1530,1531],{"class":1507},"1.3",[37,1533,464],{"class":1504},[37,1535,916],{"class":1507},[37,1537,1538],{"class":1504},"]] })\n",[1540,1541,1542],"h3",{"id":178},[33,1543,178],{},[10,1545,1546,1549,1550,1552,1553,1555],{},[33,1547,1548],{},"[ratio, tier]"," 的列表，按 ",[33,1551,652],{}," 降序，",[33,1554,652],{}," 越大视野越广。上面那组读作：比例超过 2.6 只留 0 档，超过 1.3 留到 1 档，再近就不限制。自动 fit 之后比例通常落在 1 附近，默认值因此从 1.3 起跳。",[1540,1557,1559],{"id":1558},"attribute",[33,1560,1558],{},[10,1562,1563,1564,1566,1567,1570],{},"读取节点档位的属性名，需与 styles 里消费该档位的属性名一致。",[33,1565,1484],{}," 默认就写在 ",[33,1568,1569],{},"labelTier"," 上。",[1472,1572,1574],{"id":1573},"api","API",[1540,1576,1578],{"id":1577},"usesigmalabeltiers","useSigmaLabelTiers()",[10,1580,1581],{},[33,1582,1585,1587,1589,1593,1596,1599,1602,1604],{"className":1583,"language":1584,"style":22},"language-ts-type shiki shiki-themes github-light github-light github-dark","ts-type",[37,1586,1467],{"class":1514},[37,1588,253],{"class":1504},[37,1590,1592],{"class":1591},"sP4rz","options",[37,1594,1595],{"class":1501},"?:",[37,1597,1598],{"class":1514}," UseSigmaLabelTiersOptions",[37,1600,1601],{"class":1504},")",[37,1603,183],{"class":1501},[37,1605,1606],{"class":1514}," UseSigmaLabelTiersReturn",[10,1608,1609,1610,1612],{},"必须在 ",[33,1611,1436],{}," 子树内调用。作用域销毁时自动解绑相机监听并把档位复位。",[1614,1615,1616],"h4",{"id":1592},"Options",[1618,1619,1620,1641],"field-group",{},[1621,1622,1624,1625,1628,1629,1631,1632,1634,1635,1637,1638,1640],"field",{"name":178,"type":1623},"readonly SigmaLabelTierBreakpoint[]","默认 ",[33,1626,1627],{},"[[2.6, 0], [1.3, 1]]"," —— 相机比例断点 ",[33,1630,1548],{},"，按 ",[33,1633,652],{}," 降序排列。比例大于 ",[33,1636,652],{}," 时只显示不高于 ",[33,1639,469],{}," 的档位。",[1621,1642,1624,1644,1646],{"name":1558,"type":1643},"string",[33,1645,527],{}," —— 读取节点档位的属性名，需与 styles 里消费该档位的属性名一致。",[1614,1648,1650],{"id":1649},"returns","Returns",[1618,1652,1653],{},[1621,1654,1656,1657,1660],{"name":469,"type":1655},"Readonly\u003CRef\u003Cnumber>>","当前允许显示的最低档位。所有断点都未命中时为 ",[33,1658,1659],{},"Infinity","，即不限制。",[10,1662,1663,1666,1667,1670],{},[33,1664,1665],{},"SigmaLabelTierBreakpoint"," 的形态是 ",[33,1668,1669],{},"readonly [ratio: number, tier: number]","。类型从根出口取：",[26,1672,1674],{"className":1492,"code":1673,"language":1494,"meta":22,"style":22},"import type { SigmaLabelTierBreakpoint, UseSigmaLabelTiersOptions, UseSigmaLabelTiersReturn } from '@movk\u002Fsigma'\n",[33,1675,1676],{"__ignoreMap":22},[37,1677,1678,1680,1682,1685,1687],{"class":39,"line":40},[37,1679,90],{"class":1501},[37,1681,118],{"class":1501},[37,1683,1684],{"class":1504}," { SigmaLabelTierBreakpoint, UseSigmaLabelTiersOptions, UseSigmaLabelTiersReturn } ",[37,1686,100],{"class":1501},[37,1688,1690],{"class":1689},"sIIMD"," '@movk\u002Fsigma'\n",[1458,1692,1693],{},"html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":22,"searchDepth":83,"depth":83,"links":1695},[1696,1700],{"id":1474,"depth":83,"text":1474,"children":1697},[1698,1699],{"id":178,"depth":108,"text":178},{"id":1558,"depth":108,"text":1558},{"id":1573,"depth":83,"text":1574,"children":1701},[1702],{"id":1577,"depth":108,"text":1578},"interaction",null,"md",false,{},"\u002Fdocs\u002Fcomposables\u002Fuse-sigma-label-tiers",{"title":1467,"description":1710},"Show fewer labels as the camera zooms out, keeping only the top tiers by relaying the current level through a style rule.",{"loc":1708},"docs\u002F3.composables\u002F13.use-sigma-label-tiers","yIJCfTGEWvV1E64TzydnLq_tka3zOLM19It8wlRzoTA",[1715],{"title":1716,"path":1717,"stem":1718,"children":1719,"page":1706},"Docs","\u002Fdocs","docs",[1720,1761,1823,1907],{"title":1721,"path":1722,"stem":1723,"children":1724,"category":1704,"description":1704,"icon":1760},"开始","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started\u002F1.index",[1725,1728,1733,1738],{"title":1726,"path":1722,"stem":1723,"category":1704,"description":1727},"简介","Movk Sigma 是基于 sigma v4 的知识图谱可视化 Nuxt 模块，为 Vue 3 \u002F Nuxt 4 提供声明式组件与 composables。",{"title":1729,"path":1730,"stem":1731,"category":1704,"description":1732},"安装","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation","安装 Movk Sigma 与必需的 peer 依赖，按需补装布局、分析、渲染程序等可选包。",{"title":1734,"path":1735,"stem":1736,"category":1704,"description":1737},"Vue + Vite","\u002Fdocs\u002Fgetting-started\u002Fvue","docs\u002F1.getting-started\u002F3.vue","在纯 Vue 3 + Vite 项目中经 @movk\u002Fsigma\u002Fvite、@movk\u002Fsigma\u002Fvue 与 vue-plugin 使用同一套组件与 composables。",{"title":1739,"category":1704,"description":1704,"icon":1740,"path":1741,"stem":1742,"children":1743,"page":1706},"AI 集成","i-lucide-bot","\u002Fdocs\u002Fgetting-started\u002Fai","docs\u002F1.getting-started\u002Fai",[1744,1750,1755],{"title":1745,"path":1746,"stem":1747,"category":1748,"description":1749},"MCP Server","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fmcp","docs\u002F1.getting-started\u002Fai\u002F1.mcp","ai","文档站内置 MCP Server，供 AI 智能体检索本库组件、composables、示例，并提供 styles 绑定与渲染原语等增强工具。",{"title":1751,"path":1752,"stem":1753,"category":1748,"description":1754},"llms.txt","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fllms-txt","docs\u002F1.getting-started\u002Fai\u002F2.llms-txt","文档站自动生成 llms.txt 与 llms-full.txt，为大模型提供结构化的库能力与文档索引。",{"title":1756,"path":1757,"stem":1758,"category":1748,"description":1759},"Agent Skills","\u002Fdocs\u002Fgetting-started\u002Fai\u002Fskills","docs\u002F1.getting-started\u002Fai\u002F3.skills","文档站发布 movk-sigma Agent Skill，让 AI 工具一条命令即可学会用本库声明式地构建知识图谱。","i-lucide-square-play",{"title":1762,"category":1704,"description":1704,"icon":1763,"path":1764,"stem":1765,"children":1766,"page":1706},"组件","i-lucide-box","\u002Fdocs\u002Fcomponents","docs\u002F2.components",[1767,1772,1777,1782,1787,1792,1798,1803,1808,1813,1818],{"title":1436,"path":1768,"stem":1769,"category":1770,"description":1771},"\u002Fdocs\u002Fcomponents\u002Fgraph","docs\u002F2.components\u002F01.graph","core","根组件。创建 Sigma 实例与 graphology 图，下发上下文，透传配置，转发全部 sigma 事件。",{"title":1773,"path":1774,"stem":1775,"category":1770,"description":1776},"SigmaOverlay","\u002Fdocs\u002Fcomponents\u002Foverlay","docs\u002F2.components\u002F02.overlay","跟随画布定位的 DOM 覆盖层，可锚定到节点或图坐标，缩放平移时自动同步位置。",{"title":1778,"path":1779,"stem":1780,"category":1770,"description":1781},"SigmaTooltip","\u002Fdocs\u002Fcomponents\u002Ftooltip","docs\u002F2.components\u002F03.tooltip","悬浮或点击节点与边时弹出的提示层，默认展示 label，可用插槽完全接管内容。",{"title":1783,"path":1784,"stem":1785,"category":1770,"description":1786},"SigmaPopover","\u002Fdocs\u002Fcomponents\u002Fpopover","docs\u002F2.components\u002F04.popover","锚定到节点的常驻浮层，内部可交互，开合状态由 v-model:open 控制。",{"title":1788,"path":1789,"stem":1790,"category":1770,"description":1791},"SigmaContextMenu","\u002Fdocs\u002Fcomponents\u002Fcontext-menu","docs\u002F2.components\u002F05.context-menu","右键节点、边或空白处弹出的菜单，自动压掉浏览器原生菜单。",{"title":1793,"path":1794,"stem":1795,"category":1796,"description":1797},"SigmaControls","\u002Fdocs\u002Fcomponents\u002Fcontrols","docs\u002F2.components\u002F06.controls","controls","控件容器，负责八向停靠与排布方向，替使用方做掉绝对定位这件事。",{"title":1799,"path":1800,"stem":1801,"category":1796,"description":1802},"SigmaZoomControl","\u002Fdocs\u002Fcomponents\u002Fzoom-control","docs\u002F2.components\u002F07.zoom-control","放大、缩小、复位三个按钮，图标可经具名插槽替换，行为与无障碍结构由库提供。",{"title":1804,"path":1805,"stem":1806,"category":1796,"description":1807},"SigmaFullscreenControl","\u002Fdocs\u002Fcomponents\u002Ffullscreen-control","docs\u002F2.components\u002F08.fullscreen-control","全屏开关。整个 .sigma-root 一起进入全屏，覆盖层与其他控件都跟随。",{"title":1809,"path":1810,"stem":1811,"category":1796,"description":1812},"SigmaSearchControl","\u002Fdocs\u002Fcomponents\u002Fsearch-control","docs\u002F2.components\u002F09.search-control","带防抖、键盘导航与命中高亮的检索框，四个插槽可逐层接管外观，作用域连行为一起给。",{"title":1814,"path":1815,"stem":1816,"category":1796,"description":1817},"SigmaLegend","\u002Fdocs\u002Fcomponents\u002Flegend","docs\u002F2.components\u002F10.legend","按节点属性聚合的图例，点击条目切换该组显隐，插槽同时给出数据与切换行为。",{"title":1819,"path":1820,"stem":1821,"category":1796,"description":1822},"SigmaMiniMap","\u002Fdocs\u002Fcomponents\u002Fmini-map","docs\u002F2.components\u002F11.mini-map","缩略图与视口框，点击任意位置把相机平移过去。",{"title":1824,"category":1704,"description":1704,"icon":1825,"path":1826,"stem":1827,"children":1828,"page":1706},"Composables","i-lucide-plug","\u002Fdocs\u002Fcomposables","docs\u002F3.composables",[1829,1835,1840,1845,1850,1855,1860,1865,1870,1875,1880,1885,1890,1891,1897,1902],{"title":1830,"path":1831,"stem":1832,"category":1833,"description":1834},"useSigma","\u002Fdocs\u002Fcomposables\u002Fuse-sigma","docs\u002F3.composables\u002F01.use-sigma","base","注入当前 SigmaGraph 的上下文，拿到原生 Sigma 与 graphology 实例。",{"title":1836,"path":1837,"stem":1838,"category":1833,"description":1839},"useSigmaById","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-by-id","docs\u002F3.composables\u002F02.use-sigma-by-id","按 id 取实例上下文，用于组件树之外或跨路由访问；useSigmaIds 列出全部已登记的 id。",{"title":1841,"path":1842,"stem":1843,"category":1833,"description":1844},"useSigmaGraph","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-graph","docs\u002F3.composables\u002F03.use-sigma-graph","把 graphology 的变更桥接成 Vue 的响应式信号，提供 version、order、size 与变更回调。",{"title":1846,"path":1847,"stem":1848,"category":1833,"description":1849},"useSigmaEvents","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-events","docs\u002F3.composables\u002F04.use-sigma-events","声明式绑定 sigma 事件，作用域销毁时自动解绑，接受根组件 emits 未覆盖的任意事件名。",{"title":1851,"path":1852,"stem":1853,"category":1833,"description":1854},"useSigmaSettings","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-settings","docs\u002F3.composables\u002F05.use-sigma-settings","把响应式的配置同步到 sigma，源变化即调用 setSettings，整体透传不做键过滤。",{"title":1856,"path":1857,"stem":1858,"category":1833,"description":1859},"useSigmaState","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-state","docs\u002F3.composables\u002F06.use-sigma-state","读写 sigma 的交互状态，把悬停、高亮、隐藏这些纯展示态存在实例内部而不污染图数据。",{"title":1861,"path":1862,"stem":1863,"category":1703,"description":1864},"useSigmaCamera","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-camera","docs\u002F3.composables\u002F07.use-sigma-camera","相机操作。缩放、复位、聚焦节点、避开浮层遮挡地容纳节点，以及图坐标到屏幕坐标的换算。",{"title":1866,"path":1867,"stem":1868,"category":1703,"description":1869},"useSigmaSelection","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-selection","docs\u002F3.composables\u002F08.use-sigma-selection","悬浮与选中的状态机，把焦点及其邻居写进 isHighlighted 状态，其余元素由库内规则淡出。",{"title":1871,"path":1872,"stem":1873,"category":1703,"description":1874},"useSigmaNeighborhood","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-neighborhood","docs\u002F3.composables\u002F09.use-sigma-neighborhood","以某节点为中心逐层扩散的 BFS 邻域计算，以及「点击展开」的远端增量合入。",{"title":1876,"path":1877,"stem":1878,"category":1703,"description":1879},"useSigmaDrag","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-drag","docs\u002F3.composables\u002F10.use-sigma-drag","把 sigma 的 enableNodeDrag 接进 Vue 的响应式，开关跟随 enabled，过程暴露为 dragged 与 isDragging。",{"title":1881,"path":1882,"stem":1883,"category":1703,"description":1884},"useSigmaSearch","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-search","docs\u002F3.composables\u002F11.use-sigma-search","按属性检索节点与边，结果随图变更自动重算，可把相机聚焦到命中项。",{"title":1886,"path":1887,"stem":1888,"category":1703,"description":1889},"useSigmaFilter","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-filter","docs\u002F3.composables\u002F12.use-sigma-filter","声明式过滤，落到 sigma 的 isHidden 状态上，不改动图数据本身。",{"title":1467,"path":1708,"stem":1712,"category":1703,"description":15},{"title":1892,"path":1893,"stem":1894,"category":1895,"description":1896},"useSigmaLayout","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-layout","docs\u002F3.composables\u002F14.use-sigma-layout","analysis","五种布局算法的统一入口，支持按连通分量分别布局，并托管 ForceAtlas2 与 Noverlap 的 worker 生命周期。",{"title":1898,"path":1899,"stem":1900,"category":1895,"description":1901},"useSigmaMetrics","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-metrics","docs\u002F3.composables\u002F15.use-sigma-metrics","图的度数、中心性与社区划分，按图版本缓存避免重复计算。",{"title":1903,"path":1904,"stem":1905,"category":1895,"description":1906},"useSigmaExport","\u002Fdocs\u002Fcomposables\u002Fuse-sigma-export","docs\u002F3.composables\u002F16.use-sigma-export","把当前画面导出为 PNG，可取 Blob 自行处理，也可直接触发浏览器下载。",{"title":1908,"category":1704,"description":1704,"icon":1909,"path":1910,"stem":1911,"children":1912,"page":1706},"工具函数","i-lucide-wrench","\u002Fdocs\u002Futils","docs\u002F4.utils",[1913,1918,1923,1928,1931,1936],{"title":1914,"path":1915,"stem":1916,"category":1704,"description":1917},"applyGraphDiff","\u002Fdocs\u002Futils\u002Fapply-graph-diff","docs\u002F4.utils\u002F1.apply-graph-diff","把 SerializedGraph 增量同步到 graphology 实例，替代 clear() 加 import()，保留已有节点的布局坐标。",{"title":1919,"path":1920,"stem":1921,"category":1704,"description":1922},"composeStyles","\u002Fdocs\u002Futils\u002Fcompose-styles","docs\u002F4.utils\u002F2.compose-styles","按序拼接多份 styles 声明，让用户规则与 DEFAULT_STYLES 共存而不是互相顶掉。",{"title":1924,"path":1925,"stem":1926,"category":1704,"description":1927},"labelPlacements","\u002Fdocs\u002Futils\u002Flabel-placements","docs\u002F4.utils\u002F3.label-placements","给每个节点选一个背离邻居的标签方位，返回节点 key 到方位的映射表。",{"title":498,"path":1481,"stem":1929,"category":1704,"description":1930},"docs\u002F4.utils\u002F4.degree-to-tier","按度数排名给节点分标签档位，返回节点 key 到档位的映射表，档位越小越重要。",{"title":1932,"path":1933,"stem":1934,"category":1704,"description":1935},"sdfPolygon \u002F sdfStar","\u002Fdocs\u002Futils\u002Fsdf-shapes","docs\u002F4.utils\u002F5.sdf-shapes","把节点画成正多边形或星形的 SDF 形状声明，形状是与颜色正交的第二个编码维度。",{"title":1937,"path":1938,"stem":1939,"category":1704,"description":1940},"defineSigmaPrimitives","\u002Fdocs\u002Futils\u002Fdefine-sigma-primitives","docs\u002F4.utils\u002F6.define-sigma-primitives","声明一份延迟加载的渲染原语，绕开 sigma 在模块顶层读取 WebGL 全局导致的 SSR 崩溃。",{"data":1942,"body":1943},{},{"type":6,"children":1944},[1945],{"type":9,"tag":10,"props":1946,"children":1947},{},[1948,1950],{"type":14,"value":1949},"Copyright © 2026 - 2026 YiXuan - ",{"type":9,"tag":37,"props":1951,"children":1954},{"className":1952},[1953],"text-highlighted",[1955],{"type":14,"value":1956},"MIT License",[1958,1959],{"title":1886,"path":1887,"stem":1888,"description":1889,"children":-1},{"title":1892,"path":1893,"stem":1894,"description":1896,"children":-1},1795515183051,"63cc32bb-ed0d-4a02-83fd-40ba6fe4b04e"]