Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geo3d坐标系中设置scatter3d,当geo3d设置倾斜时,scatter3d没有跟随倾斜,没有设置倾斜的方法 #530

Open
llifangyin opened this issue Jul 31, 2024 · 1 comment

Comments

@llifangyin
Copy link

llifangyin commented Jul 31, 2024

期望scatter3d也倾斜一下,目前他的角度一直是垂直于平面,导致被遮挡住一部分;

codesandebox代码

以下是配置代码

var dom = document.getElementById("chart-container");
var myChart = echarts.init(dom, null, {
  renderer: "canvas",
  useDirtyRect: false,
});
var app = {};
var ROOT_PATH = "https://echarts.apache.org/examples";
var option;
let url = "../henan.json";
$.getJSON(url, function (data) {
  console.log(data);
  echarts.registerMap("china", data);
  myChart.setOption({
    geo3D: {
      map: "china",
      itemStyle: {
        color: "#00ff00",
      },
      zlevel: 1,
      viewControl: {
        distance: 120,
        alpha: 90, // 90 default normal
        beta: 0,
        panMouseButton: "left",
        rotateMouseButton: "right",
      },
      regionHeight: 8,
    },
    series: [
      {
        type: "scatter3D",
        coordinateSystem: "geo3D",
        symbol: "circle",
        itemStyle: { color: "blue" },
        symbolSize: 20,
        data: [
          [113.66, 34.75],
          [114.31, 34.8],
        ],
        zlevel: 1,
      },
    ],
  });
});

if (option && typeof option === "object") {
  myChart.setOption(option);
}

window.addEventListener("resize", myChart.resize);
``` js
```[tasklist]
### Tasks

Tasks

No tasks being tracked yet.
@helgasoft
Copy link

scatter3d does not follow the tilt when geo3d is set to tilt.

yes, scatter3D points are in fact bodiless/immaterial 2D circles, see #464.
Also to get them off the ground you'll need a workaround with a dummy point - Demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants