简体   繁体   English

向箱线图添加点(用于异常值)

[英]Add dots to a boxplot chart (for outliers)

I would like to do a boxplot chart like this one with AmCharts4 but in addition I want to add some dots to represent the outliers.我想用 AmCharts4 做一个像这样的箱线图,但另外我想添加一些点来表示异常值。 What is the way to go? go的方法是什么? (I'm not asking for the identification of the outliers, just for the way to add some dots). (我不是要求识别异常值,只是为了添加一些点的方式)。

I've found the way:我找到了方法:

var outliers = [{
    "date": "2019-08-01",
     y: 125
  }, {
    "date": "2019-08-01",
     y: 128
  }, {
    "date": "2019-08-02",
     y: 130
  }];

var bulletSeries = chart.series.push(new am4charts.LineSeries());
bulletSeries.strokeOpacity = 0;
bulletSeries.data = outliers;
bulletSeries.dataFields.dateX = "date";
bulletSeries.dataFields.valueY = "y";
var bullet = bulletSeries.bullets.push(new am4charts.CircleBullet());
bulletSeries.tooltipText = "{valueY.value}";

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

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