apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.21k stars 19.61k forks source link

横纵坐标轴相同单位的笛卡尔坐标系 #8908

Closed eniaclyl closed 3 years ago

eniaclyl commented 6 years ago

One-line summary [问题简述]

我有一组点数据,用来在折线图上画圆,但是当窗口尺寸变化的时候,圆也跟这变形了,或者你们有什么办法可以在折线图上画一个可以支持缩放的正圆,谢谢。 你们可能还需要重写window.onresize = function () { myChart.resize(); }

Version & Environment [版本及环境]

Expected behaviour [期望结果]

如何让窗口尺寸变化时让我的圆保持为一个正圆而不是椭圆。

ECharts option [ECharts配置项]

option = {
series: [
            {
                name: '测试曲线一',
                data: [[
                    970.2634887695312,
                    916.5289306640625
                ],
                [
                    955.5230102539062,
                    1085.013427734375
                ],
                [
                    911.7494506835938,
                    1248.3785400390625
                ],
                [
                    840.2728271484375,
                    1401.66064453125
                ],
                [
                    743.2649536132812,
                    1540.2022705078125
                ],
                [
                    623.6734008789062,
                    1659.7939453125
                ],
                [
                    485.1317138671875,
                    1756.8017578125
                ],
                [
                    331.84967041015625,
                    1828.2783203125
                ],
                [
                    168.48452758789062,
                    1872.052001953125
                ],
                [
                    -4.2411564209032804e-05,
                    1886.79248046875
                ],
                [
                    -168.4844970703125,
                    1872.052001953125
                ],
                [
                    -331.8496398925781,
                    1828.2783203125
                ],
                [
                    -485.1318054199219,
                    1756.8017578125
                ],
                [
                    -623.6734008789062,
                    1659.7939453125
                ],
                [
                    -743.2649536132812,
                    1540.202392578125
                ],
                [
                    -840.2728271484375,
                    1401.6607666015625
                ],
                [
                    -911.7494506835938,
                    1248.378662109375
                ],
                [
                    -955.5230102539062,
                    1085.0135498046875
                ],
                [
                    -970.2634887695312,
                    916.5288696289062
                ],
                [
                    -955.5230102539062,
                    748.04443359375
                ],
                [
                    -911.7494506835938,
                    584.6792602539062
                ],
                [
                    -840.2728271484375,
                    431.397216796875
                ],
                [
                    -743.2650146484375,
                    292.8555908203125
                ],
                [
                    -623.6732788085938,
                    173.26385498046875
                ],
                [
                    -485.13165283203125,
                    76.25604248046875
                ],
                [
                    -331.8495788574219,
                    4.7794189453125
                ],
                [
                    -168.4844512939453,
                    -38.994140625
                ],
                [
                    1.1570276001293678e-05,
                    -53.73455810546875
                ],
                [
                    168.4844512939453,
                    -38.99407958984375
                ],
                [
                    331.849609375,
                    4.77947998046875
                ],
                [
                    485.13165283203125,
                    76.25604248046875
                ],
                [
                    623.6732788085938,
                    173.263916015625
                ],
                [
                    743.2648315429688,
                    292.85546875
                ],
                [
                    840.2727661132812,
                    431.3970031738281
                ],
                [
                    911.7493896484375,
                    584.6790771484375
                ],
                [
                    955.5230712890625,
                    748.044677734375
                ],
                [
                    970.2634887695312,
                    916.5291137695312
                ]],
                // sampling: 'average', //以优化模式显示
                type: 'line'
            }
        ],
        xAxis: {
            type: 'value'
        },
        yAxis: {
            type: 'value'
        }
}

Other comments [其他信息]

eniaclyl commented 5 years ago

有人帮我吗谢谢

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] commented 3 years ago

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!