简体   繁体   English

Highcharts,vue组件。 3 图表合 1

[英]Highcharts, vue component. 3 charts in 1

expected chart预期图表

Hi, I need to make this charts, looks like 3 charts in 1(?).嗨,我需要制作这个图表,看起来像 1 个中的 3 个图表(?)。 I can make the 2 scatered ones, but the column charts its tricky.我可以制作 2 个分散的,但柱形图很棘手。 Thanks to Wojciech Chmiel I was able to make this columns charts with highcharts-vue, but the chart behaviour its a little odd, I cant add a yAxis, nor stop the chart from pushing to the top like a sort of responsive behaviour.感谢 Wojciech Chmiel,我能够使用 highcharts-vue 制作此柱形图,但图表行为有点奇怪,我无法添加 yAxis,也无法阻止图表像响应行为一样推到顶部。

@Wojciech Chmiel Hi, sorry for the delay. @Wojciech Chmiel 嗨,抱歉耽搁了。 A columnrange chart with a bloxplot and 2 scatter带有 bloxplot 和 2 个散点的柱形图

 initChart (data) { this.chartOptions = merge(this.getBaseChartConfig(ChartTypes.BoxPlot), { xAxis: { categories: data.periods }, series: [ { type: 'columnrange', name: 'Observations', data:data.peerGroupStatisticReturns.dataRange, showInLegend: false }, { type: 'boxplot', linkedTo: ':previous', data: data.peerGroupStatisticReturns.values }, { type: 'scatter', name: data.names[1], marker: { symbol: 'diamond', fillColor: '#6598FD', radius: 6 }, data: data.benchmarkReturnSeries.data }, { type: 'scatter', name: data.names[2], marker: { symbol: 'square', fillColor: '#FFCC33' }, data: data.productReturnSeries.data } ] }) // chart settings const boxPlotConfig = { title: { text: '' }, plotOptions: { boxplot: { fillColor: '#0076C0', medianColor: '#303030', medianWidth: 1, stemWidth: 0, whiskerWidth: 0, color: '#303030', showInLegend: false }, columnrange: { color: '#66ADD9' }, series: { enableMouseTracking: false, borderColor: '#303030' } }, yAxis: { title: '' } }
 <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>

Now I have make the colors interspersed and move the markers so the dont overlap, one to the right inside the column and one to the left现在我已经让 colors 穿插并移动标记,使标记不重叠,一个在列内右侧,一个在左侧

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM