react-highcharts

React Highcharts firing setExtremes event multiple times

时光总嘲笑我的痴心妄想 提交于 2021-02-08 07:06:11
问题 I am using Highcharts React wrapper in an app using Hooks, when my chart is either loaded or zoomed it fires both setExtremes and setAfterExtremes multiple times each. I've looked through for similar questions but they are related to different issues. I've reduced the code to the minimum setup, the page is not refreshing, the data is only parsed once and added to the chart once yet, animation is disabled and it's still consistently firing both events 7 times on: * initial population * on zoom

React Highcharts firing setExtremes event multiple times

☆樱花仙子☆ 提交于 2021-02-08 07:04:39
问题 I am using Highcharts React wrapper in an app using Hooks, when my chart is either loaded or zoomed it fires both setExtremes and setAfterExtremes multiple times each. I've looked through for similar questions but they are related to different issues. I've reduced the code to the minimum setup, the page is not refreshing, the data is only parsed once and added to the chart once yet, animation is disabled and it's still consistently firing both events 7 times on: * initial population * on zoom

How to aligment nodes with highcharts

我怕爱的太早我们不能终老 提交于 2021-01-29 16:30:45
问题 I am trying to alignment nodes, But I cant see any options how to do it, Currently my code is Highcharts.chart('container', { chart: { type: 'networkgraph', plotBorderWidth: 1 }, title: { text: 'Trans-Siberian Railway' }, subtitle: { text: 'Barnes-Hut approximation' }, plotOptions: { networkgraph: { layoutAlgorithm: { enableSimulation: false, linkLength: 100, integration: 'verlet', approximation: 'barnes-hut', gravitationalConstant: 4, // Elastic like forces: attractiveForce: function (d, k)

React highchart: Shared tooltip in same and different chart

老子叫甜甜 提交于 2021-01-28 05:17:56
问题 I am using react-highchart for a project. And displaying two charts: 1) Line Chart with 2 series data, it will render two lines on same chart. 2) Bar or Column Chart. Now when I hover over a point it should enable tooltip on both lines in 1st chart and in column chart as well. X-axis is datetime. It should active point on both lines like this: In react-highchart , I have used shared: true attribute, but it is not making both lines active. tooltip: { enabled: true, useHTML: true, shared: true,

How can I use chart tooltip formatter in react-highcharts?

梦想与她 提交于 2021-01-27 03:50:26
问题 how can I use chart tooltip formatter? I am using react wrapper for highcharts. I have config like this: const CHART_CONFIG = { ... tooltip: { formatter: (tooltip) => { var s = '<b>' + this.x + '</b>'; _.each(this.points, () => { s += '<br/>' + this.series.name + ': ' + this.y + 'm'; }); return s; }, shared: true }, ... } But I can't access chart scope using this keyword and also I can't get point from tooltip param. Thanks 回答1: I've already encountered this problem. I've solved it by

How can I use chart tooltip formatter in react-highcharts?

狂风中的少年 提交于 2021-01-27 03:50:14
问题 how can I use chart tooltip formatter? I am using react wrapper for highcharts. I have config like this: const CHART_CONFIG = { ... tooltip: { formatter: (tooltip) => { var s = '<b>' + this.x + '</b>'; _.each(this.points, () => { s += '<br/>' + this.series.name + ': ' + this.y + 'm'; }); return s; }, shared: true }, ... } But I can't access chart scope using this keyword and also I can't get point from tooltip param. Thanks 回答1: I've already encountered this problem. I've solved it by

How can I use chart tooltip formatter in react-highcharts?

删除回忆录丶 提交于 2021-01-27 03:50:13
问题 how can I use chart tooltip formatter? I am using react wrapper for highcharts. I have config like this: const CHART_CONFIG = { ... tooltip: { formatter: (tooltip) => { var s = '<b>' + this.x + '</b>'; _.each(this.points, () => { s += '<br/>' + this.series.name + ': ' + this.y + 'm'; }); return s; }, shared: true }, ... } But I can't access chart scope using this keyword and also I can't get point from tooltip param. Thanks 回答1: I've already encountered this problem. I've solved it by

Add symbol to custom legend layout - Highcharts React

自闭症网瘾萝莉.ら 提交于 2020-12-15 07:53:07
问题 I have managed to create a custom legend to display the series under each category in the legend. I am able to access the name, however I am not able to get the symbol to render along with the name in the legend. Please advice. import React, { Component } from "react"; import * as Highcharts from "highcharts"; import HighchartsReact from "highcharts-react-official"; import HC_more from "highcharts/highcharts-more"; import HC_exporting from "highcharts/modules/exporting"; import HC_series