w-plot-vue 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +1 -1
  2. package/dist/w-plot-vue.umd.js +1 -1
  3. package/docs/examples/app.html +1 -1
  4. package/docs/examples/app.umd.js +2 -2
  5. package/docs/examples/app.umd.js.map +1 -1
  6. package/docs/examples/w-bar_horizontal_multi-set(color).html +1 -1
  7. package/docs/examples/w-bar_horizontal_multi-set(color, gradient).html +1 -1
  8. package/docs/examples/w-bar_horizontal_multi-set(series color).html +1 -1
  9. package/docs/examples/w-bar_horizontal_multi-set(series color, gradient).html +1 -1
  10. package/docs/examples/w-bar_horizontal_multi-set.html +1 -1
  11. package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackNormal).html +1 -1
  12. package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackPercent).html +1 -1
  13. package/docs/examples/w-bar_horizontal_multi-set__hide legned.html +1 -1
  14. package/docs/examples/w-bar_horizontal_multi-set__show labels.html +1 -1
  15. package/docs/examples/w-bar_horizontal_multi-set_barKpColor(gradient).html +1 -1
  16. package/docs/examples/w-bar_horizontal_multi-set_barKpColor.html +1 -1
  17. package/docs/examples/w-bar_horizontal_multi-set_barUseInnerLabelsForHorizontal_barGroupWidthRatio.html +1 -1
  18. package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio.html +1 -1
  19. package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio_barGroupWidthRatio.html +1 -1
  20. package/docs/examples/w-bar_horizontal_one-set(color).html +1 -1
  21. package/docs/examples/w-bar_horizontal_one-set(color, gradient).html +1 -1
  22. package/docs/examples/w-bar_horizontal_one-set.html +1 -1
  23. package/docs/examples/w-bar_horizontal_one-set_barColor(gradient).html +1 -1
  24. package/docs/examples/w-bar_horizontal_one-set_barColor.html +1 -1
  25. package/docs/examples/w-bar_horizontal_one-set_barKpColor(gradient).html +1 -1
  26. package/docs/examples/w-bar_horizontal_one-set_barKpColor.html +1 -1
  27. package/docs/examples/w-bar_horizontal_one-set_barUseInnerLabelsForHorizontal.html +1 -1
  28. package/docs/examples/w-bar_horizontal_one-set_barWidthRatio.html +1 -1
  29. package/docs/examples/w-bar_horizontal_one-set_barWidthRatio_barGroupWidthRatio.html +1 -1
  30. package/docs/examples/w-bar_horizontal_one-set_hide labels.html +1 -1
  31. package/docs/examples/w-bar_horizontal_one-set_marginLeft_marginRight.html +1 -1
  32. package/docs/examples/w-bar_horizontal_one-set_show legned.html +1 -1
  33. package/docs/examples/w-bar_multi-set(color).html +1 -1
  34. package/docs/examples/w-bar_multi-set(color, gradient).html +1 -1
  35. package/docs/examples/w-bar_multi-set(series color).html +1 -1
  36. package/docs/examples/w-bar_multi-set(series color, gradient).html +1 -1
  37. package/docs/examples/w-bar_multi-set.html +1 -1
  38. package/docs/examples/w-bar_multi-set__barDisplay(stackNormal).html +1 -1
  39. package/docs/examples/w-bar_multi-set__barDisplay(stackNormal)_.html +1 -1
  40. package/docs/examples/w-bar_multi-set__barDisplay(stackPercent).html +1 -1
  41. package/docs/examples/w-bar_multi-set__hide legned.html +1 -1
  42. package/docs/examples/w-bar_multi-set__show labels.html +1 -1
  43. package/docs/examples/w-bar_multi-set_barKpColor(gradient).html +1 -1
  44. package/docs/examples/w-bar_multi-set_barKpColor.html +1 -1
  45. package/docs/examples/w-bar_multi-set_barWidthRatio.html +1 -1
  46. package/docs/examples/w-bar_multi-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +1 -1
  47. package/docs/examples/w-bar_one-set(color).html +1 -1
  48. package/docs/examples/w-bar_one-set(color, gradient).html +1 -1
  49. package/docs/examples/w-bar_one-set.html +1 -1
  50. package/docs/examples/w-bar_one-set_barColor(gradient).html +1 -1
  51. package/docs/examples/w-bar_one-set_barColor.html +1 -1
  52. package/docs/examples/w-bar_one-set_barKpColor(gradient).html +1 -1
  53. package/docs/examples/w-bar_one-set_barKpColor.html +1 -1
  54. package/docs/examples/w-bar_one-set_barWidthRatio.html +1 -1
  55. package/docs/examples/w-bar_one-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +1 -1
  56. package/docs/examples/w-bar_one-set_hide labels.html +1 -1
  57. package/docs/examples/w-bar_one-set_marginLeft_marginRight_marginTop.html +1 -1
  58. package/docs/examples/w-bar_one-set_show legned.html +1 -1
  59. package/docs/examples/w-pie_one-set(color).html +1 -1
  60. package/docs/examples/w-pie_one-set(color, gradient).html +1 -1
  61. package/docs/examples/w-pie_one-set.html +1 -1
  62. package/docs/examples/w-pie_one-set_hide labels.html +1 -1
  63. package/docs/examples/w-pie_one-set_hide legned.html +1 -1
  64. package/docs/examples/w-pie_one-set_marginLeft_marginRight_marginTop.html +1 -1
  65. package/docs/examples/w-pie_one-set_pieBorderRadius.html +1 -1
  66. package/docs/examples/w-pie_one-set_pieBorderWidth_pieBorderRadius.html +1 -1
  67. package/docs/examples/w-pie_one-set_pieKpColor(gradient).html +1 -1
  68. package/docs/examples/w-pie_one-set_pieKpColor.html +1 -1
  69. package/docs/examples/w-pie_one-set_pieThicknessRatio.html +1 -1
  70. package/docs/examples/w-plot_default.html +1 -1
  71. package/docs/examples/w-rose_multi-set(color).html +1 -1
  72. package/docs/examples/w-rose_multi-set(color, gradient).html +1 -1
  73. package/docs/examples/w-rose_multi-set(series color).html +1 -1
  74. package/docs/examples/w-rose_multi-set(series color, gradient).html +1 -1
  75. package/docs/examples/w-rose_multi-set.html +1 -1
  76. package/docs/examples/w-rose_multi-set__hide legned.html +1 -1
  77. package/docs/examples/w-rose_multi-set__show labels.html +1 -1
  78. package/docs/examples/w-rose_multi-set_roseBorderWidth.html +1 -1
  79. package/docs/examples/w-rose_multi-set_roseKpColor(gradient).html +1 -1
  80. package/docs/examples/w-rose_multi-set_roseKpColor.html +1 -1
  81. package/docs/examples/w-rose_multi-set_roseWidthRatio.html +1 -1
  82. package/docs/examples/w-rose_one-set(color).html +1 -1
  83. package/docs/examples/w-rose_one-set(color, gradient).html +1 -1
  84. package/docs/examples/w-rose_one-set.html +1 -1
  85. package/docs/examples/w-rose_one-set_marginLeft_marginRight_marginTop.html +1 -1
  86. package/docs/examples/w-rose_one-set_roseBorderWidth.html +1 -1
  87. package/docs/examples/w-rose_one-set_roseKpColor(gradient).html +1 -1
  88. package/docs/examples/w-rose_one-set_roseKpColor.html +1 -1
  89. package/docs/examples/w-rose_one-set_roseShowLabels.html +1 -1
  90. package/docs/examples/w-rose_one-set_roseWidthRatio.html +1 -1
  91. package/docs/examples/w-rose_one-set_showLegend.html +1 -1
  92. package/docs/examples/w-rose_one-set_showLegend_legendPosition.html +1 -1
  93. package/docs/examples/w-set-multi_default.html +1 -1
  94. package/docs/examples/w-set-multi_hide labels.html +1 -1
  95. package/docs/examples/w-set-multi_hide legned.html +1 -1
  96. package/docs/examples/w-set-multi_keySelect.html +1 -1
  97. package/docs/examples/w-set-multi_slot head.html +1 -1
  98. package/docs/examples/w-set-multi_textPlotType_kpSelectText_widthSelect.html +1 -1
  99. package/docs/examples/w-set-one_default.html +1 -1
  100. package/docs/examples/w-set-one_hide labels.html +1 -1
  101. package/docs/examples/w-set-one_keySelect.html +1 -1
  102. package/docs/examples/w-set-one_show legned.html +1 -1
  103. package/docs/examples/w-set-one_slot head.html +1 -1
  104. package/docs/examples/w-set-one_textPlotType_kpSelectText_widthSelect.html +1 -1
  105. package/docs/getDefAxis.mjs.html +1 -1
  106. package/docs/getDefChart.mjs.html +1 -1
  107. package/docs/getDefLegend.mjs.html +1 -1
  108. package/docs/getDefOpt.mjs.html +1 -1
  109. package/docs/global.html +1 -1
  110. package/docs/index.html +1 -1
  111. package/docs/module-WBar.html +1 -1
  112. package/docs/module-WPie.html +1 -1
  113. package/docs/module-WPlot.html +1 -1
  114. package/docs/module-WRose.html +1 -1
  115. package/docs/module-WSetMulti.html +1 -1
  116. package/docs/module-WSetOne.html +1 -1
  117. package/docs/setLegendLoc.mjs.html +1 -1
  118. package/package.json +1 -1
  119. package/src/App.vue +26 -17
package/src/App.vue CHANGED
@@ -14,15 +14,16 @@
14
14
 
15
15
  <div style="background:#f5f5f5;">
16
16
 
17
- <div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL1">
17
+ <div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL1 && cmpsL1.length>0">
18
18
  <WListHorizontal
19
19
  :items="cmpsL1"
20
20
  :itemActive.sync="cmpP1"
21
21
  :itemBackgroundColor="'transparent'"
22
- :itemBackgroundColorHover="'transparent'"
23
- :itemBackgroundColorActive="'transparent'"
22
+ :itemBackgroundColorHover="'#eee'"
23
+ :itemBackgroundColorActive="'#eee'"
24
24
  :keyText="'name'"
25
- @update:itemActive="(v)=>{indP2=0;indP1=getInd(v,cmpsL1)}"
25
+ :paddingStyle="{v:12,h:20}"
26
+ @update:itemActive="(v)=>{indP3=0;indP2=0;indP1=getInd(v,cmpsL1)}"
26
27
  >
27
28
  <template v-slot:item="props">
28
29
  <div style="">
@@ -30,17 +31,21 @@
30
31
  </div>
31
32
  </template>
32
33
  </WListHorizontal>
34
+ <div style="height:1px; background:#ddd;"></div>
33
35
  </div>
34
36
 
35
- <div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL2">
37
+
38
+ <div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL2 && cmpsL2.length>0">
39
+ <div style="height:3px; background:#fff;"></div>
36
40
  <WListHorizontal
37
41
  :items="cmpsL2"
38
42
  :itemActive.sync="cmpP2"
39
43
  :itemBackgroundColor="'transparent'"
40
- :itemBackgroundColorHover="'transparent'"
41
- :itemBackgroundColorActive="'transparent'"
44
+ :itemBackgroundColorHover="'#eee'"
45
+ :itemBackgroundColorActive="'#eee'"
42
46
  :keyText="'name'"
43
- @update:itemActive="(v)=>{indP2=getInd(v,cmpsL2)}"
47
+ :paddingStyle="{v:12,h:20}"
48
+ @update:itemActive="(v)=>{indP3=0;indP2=getInd(v,cmpsL2)}"
44
49
  >
45
50
  <template v-slot:item="props">
46
51
  <div style="">
@@ -48,16 +53,19 @@
48
53
  </div>
49
54
  </template>
50
55
  </WListHorizontal>
56
+ <div style="height:1px; background:#ddd;"></div>
51
57
  </div>
52
58
 
53
- <div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL3">
59
+ <div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL3 && cmpsL3.length>0">
60
+ <div style="height:3px; background:#fff;"></div>
54
61
  <WListHorizontal
55
62
  :items="cmpsL3"
56
63
  :itemActive.sync="cmpP3"
57
64
  :itemBackgroundColor="'transparent'"
58
- :itemBackgroundColorHover="'transparent'"
59
- :itemBackgroundColorActive="'transparent'"
65
+ :itemBackgroundColorHover="'#eee'"
66
+ :itemBackgroundColorActive="'#eee'"
60
67
  :keyText="'name'"
68
+ :paddingStyle="{v:12,h:20}"
61
69
  @update:itemActive="(v)=>{indP3=getInd(v,cmpsL3)}"
62
70
  >
63
71
  <template v-slot:item="props">
@@ -66,6 +74,7 @@
66
74
  </div>
67
75
  </template>
68
76
  </WListHorizontal>
77
+ <div style="height:1px; background:#ddd;"></div>
69
78
  </div>
70
79
 
71
80
  </div>
@@ -172,7 +181,7 @@ export default {
172
181
  vo.indP2 = 0
173
182
  vo.indP3 = 0
174
183
 
175
- //urlParse, http://localhost:8080/?cmp=w-pie
184
+ //urlParse, http://localhost:8080/?cmp=w-set-multi
176
185
  let p = urlParse(location.href)
177
186
  // console.log('p', p)
178
187
 
@@ -270,16 +279,15 @@ export default {
270
279
  let ls = []
271
280
  let l = 0
272
281
  let pv = (ts) => {
282
+ ls.push(l)
273
283
  each(ts, (v, k) => {
274
284
  let name = get(v, `name`, '')
275
285
  let _name = kebabCase(name)
276
286
  let cmps = get(v, `cmps`, [])
277
287
  if (cmps.length > 0) {
278
- ls.push(l)
279
288
  l++
280
289
  pv(cmps)
281
290
  l--
282
- ls.pop()
283
291
  }
284
292
  let lst = [...ls, k]
285
293
  rs.push({
@@ -290,13 +298,14 @@ export default {
290
298
  r = lst
291
299
  }
292
300
  })
301
+ ls.pop()
293
302
  }
294
303
  pv(vo.cmpsL1)
295
304
  // console.log('rs', rs)
296
305
  // console.log('r', r)
297
- vo.indP1 = get(r, 0, 0)
298
- vo.indP2 = get(r, 1, 0)
299
- vo.indP3 = get(r, 2, 0)
306
+ vo.indP1 = get(r, 1, 0)
307
+ vo.indP2 = get(r, 2, 0)
308
+ vo.indP3 = get(r, 3, 0)
300
309
  },
301
310
 
302
311
  },