AmChart no muestra información sobre herramientas en viñetas.
HTML:
<script src="//www.amcharts.com/lib/4/core.js"></script> <script src="//www.amcharts.com/lib/4/charts.js"></script> <div id="chartdiv"></div>CSS
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; } #chartdiv { width: 100%; height: 300px; }JS:
var chart = am4core.create("chartdiv", am4charts.XYChart); chart.dataSource.url = "https://fapi.binance.com/futures/data/globalLongShortAccountRatio?symbol=BTCUSDT&period=5m"; var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis()); categoryAxis.dataFields.category = "timestamp"; var valueAxis = chart.yAxes.push(new am4charts.ValueAxis()); var series1 = chart.series.push(new am4charts.LineSeries()); series1.dataFields.valueY = "shortAccount"; series1.dataFields.categoryX = "timestamp"; series1.name = "shortAccount"; series1.strokeWidth = 3; series1.tensionX = 0.7; series1.bullets.push(new am4charts.CircleBullet()); series1.tooltipText = "{categoryX}: [bold]{valueY}[/]"; var series2 = chart.series.push(new am4charts.LineSeries()); series2.dataFields.valueY = "longShortRatio"; series2.dataFields.categoryX = "timestamp"; series2.name = "longShortRatio"; series2.strokeWidth = 3; series2.tensionX = 0.7; series2.bullets.push(new am4charts.CircleBullet()); series2.tooltipText = "{categoryX}: [bold]{valueY}[/]"; var series3 = chart.series.push(new am4charts.LineSeries()); series3.dataFields.valueY = "longAccount"; series3.dataFields.categoryX = "timestamp"; series3.name = "longAccount"; series3.strokeWidth = 3; series3.tensionX = 0.7; series3.bullets.push(new am4charts.CircleBullet()); series2.tooltipText = "{categoryX}: [bold]{valueY}[/]"; chart.legend = new am4charts.Legend();También quiero mostrar la hora actual - (menos) 5 min en Xaxis.
Por ejemplo, si la hora actual es las 3:45 p. m., debería mostrar las 3:40 p. m., ¿es posible?
Muchas gracias por tu ayuda.