mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-08-15 03:33:19 +08:00

* feat: experimental component rendered tooltip * revert slot in VChart * feat: use tooltip composable * feat: try createApp * feat: use pie chart as tooltip * feat: switch to createVNode The limitation is that the tooltip detached from the current component tree, not provide/inject will try teleport next * feat: try component with teleport * wip * add xAxis example * refactor with shallowReactive * Support dynamic slot * fix: fill empty elements with object in array * shallow copy option along the path * ssr friendly * vibe docs * typo * update according to the review * add dataView slot * chore: fix warnings and errors in demo (#839) * chore: suppress warning in demo * chore: prevent multiple intializations of esbuild-wasm in demo HMR * feat: dynamically update the theme (#841) Co-authored-by: GU Yiling <justice360@gmail.com> * feat: add dataView slot * vibe docs --------- Co-authored-by: GU Yiling <justice360@gmail.com> * fix docs typo * update according to the review * small fix * remove wrapper around slotProp * update comments * remove anys * add tooltip slot prop type * target to vue 3.3 * move slot related codes to slot.ts --------- Co-authored-by: GU Yiling <justice360@gmail.com>
57 lines
1.3 KiB
JavaScript
57 lines
1.3 KiB
JavaScript
export default function getData() {
|
|
return {
|
|
textStyle: {
|
|
fontFamily: 'Inter, "Helvetica Neue", Arial, sans-serif',
|
|
fontWeight: 300,
|
|
},
|
|
legend: { top: 20 },
|
|
tooltip: {
|
|
trigger: "axis",
|
|
},
|
|
dataset: {
|
|
source: [
|
|
["product", "2012", "2013", "2014", "2015", "2016", "2017"],
|
|
["Milk Tea", 56.5, 82.1, 88.7, 70.1, 53.4, 85.1],
|
|
["Matcha Latte", 51.1, 51.4, 55.1, 53.3, 73.8, 68.7],
|
|
["Cheese Cocoa", 40.1, 62.2, 69.5, 36.4, 45.2, 32.5],
|
|
["Walnut Brownie", 25.2, 37.1, 41.2, 18, 33.9, 49.1],
|
|
],
|
|
},
|
|
xAxis: {
|
|
type: "category",
|
|
triggerEvent: true,
|
|
tooltip: { show: true, formatter: "" },
|
|
},
|
|
yAxis: {
|
|
triggerEvent: true,
|
|
tooltip: { show: true, formatter: "" },
|
|
},
|
|
series: [
|
|
{
|
|
type: "line",
|
|
smooth: true,
|
|
seriesLayoutBy: "row",
|
|
emphasis: { focus: "series" },
|
|
},
|
|
{
|
|
type: "line",
|
|
smooth: true,
|
|
seriesLayoutBy: "row",
|
|
emphasis: { focus: "series" },
|
|
},
|
|
{
|
|
type: "line",
|
|
smooth: true,
|
|
seriesLayoutBy: "row",
|
|
emphasis: { focus: "series" },
|
|
},
|
|
{
|
|
type: "line",
|
|
smooth: true,
|
|
seriesLayoutBy: "row",
|
|
emphasis: { focus: "series" },
|
|
},
|
|
],
|
|
};
|
|
}
|