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

散点图的 点内 是否可以自定义文字内容?类似下图。 #517

Open
tipshot opened this issue Dec 26, 2018 · 12 comments
Open

散点图的 点内 是否可以自定义文字内容?类似下图。 #517

tipshot opened this issue Dec 26, 2018 · 12 comments

Comments

@tipshot
Copy link
Contributor

@tipshot tipshot commented Dec 26, 2018

image

@AAChartModel
Copy link
Owner

@AAChartModel AAChartModel commented Dec 26, 2018

可以倒是可以,不过你的这个需求用AAChartKit的散点图实现合适吗?感觉你的这些原点坐标不太好计算吧?

@tipshot
Copy link
Contributor Author

@tipshot tipshot commented Dec 26, 2018

可以的话就行,什么方法?我这已经实现一部分了,你看看效果,你说的坐标不太好计算是指什么?
image

@tipshot
Copy link
Contributor Author

@tipshot tipshot commented Dec 26, 2018

点的大小如何调整?

@AAChartModel
Copy link
Owner

@AAChartModel AAChartModel commented Dec 26, 2018

AAChartModel属性MarkerRadius用于调整点的大小

@tipshot
Copy link
Contributor Author

@tipshot tipshot commented Dec 26, 2018

原点中如何自定义内容呢?

@AAChartModel
Copy link
Owner

@AAChartModel AAChartModel commented Dec 26, 2018

你这个图表需求是显示球员在球场的位置随时间的动态变化吗?

@AAChartModel
Copy link
Owner

@AAChartModel AAChartModel commented Dec 26, 2018

Highcharts.chart('container', {
    chart: {
        type: 'scatter'
    },
    xAxis: {
        type: 'category',
    },
    plotOptions: {
        series: {
            dataLabels: {
                enabled: true,
                y: 10,
                format: '{point.name} 球员'
            },
            marker: {
                radius: 20,
                symbol: 'circle',
            },
        }
    },
    series: [{
        data: [{
            name: ' 1 号',
            color: '#FF00FF',
            y: 1
        },
        {
            name: '2 号',
            color: '#FF00FF',
            y: 5
        },
        {
            name: '3 号',
            color: '#FF00FF',
            y: 9
        },
        {
            name: '4 号',
            color: '#FF00FF',
            y: 8
        },
        {
            name: '5 号',
            color: '#FF00FF',
            y: 10
        },
        ]
    }]
});

你把以上这一段JavaScript代码粘贴到 https://jshare.com.cn/highcharts/eSNmQc/3 这个在线JavaScript代码编辑框内,运行查看一下效果,应该就知道该怎么做了

@tipshot
Copy link
Contributor Author

@tipshot tipshot commented Dec 26, 2018

你这个图表需求是显示球员在球场的位置随时间的动态变化吗?

确认是不随时间动态变化的。

@tipshot
Copy link
Contributor Author

@tipshot tipshot commented Dec 26, 2018

我看了你给我的代码,但是我发现在AAChart的data里面是数组,并没有参数的设置?还是不太明白如何自定义原点内容,还请明示。

@tipshot
Copy link
Contributor Author

@tipshot tipshot commented Dec 26, 2018

另外在AASeries里面并没有找到 dataLabes属性。
image

@AAChartModel
Copy link
Owner

@AAChartModel AAChartModel commented Dec 26, 2018

嗯,那我可能需要改一下AAChartKit的源码了

@tipshot
Copy link
Contributor Author

@tipshot tipshot commented Dec 26, 2018

怎么改?这个麻烦么?

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

Successfully merging a pull request may close this issue.

None yet
2 participants