How to use the react-jsx-highcharts.provideAxis function in react-jsx-highcharts

To help you get started, we’ve selected a few react-jsx-highcharts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tlambert03 / FPbase / static / src / fpbase-spectra / Components / SpectraViewer / SpectraViewer.jsx View on Github external
0 && !chartOptions.simpleMode}
        />
        
      
    
  )
})

const MyCredits = provideAxis(function MyCredits({
  getAxis,
  getHighcharts,
  hide,
}) {
  useEffect(() => {
    const axis = getAxis()
    function shiftCredits() {
      const yShift = axis.object.chart.get("xAxis").axisTitleMargin
      axis.object.chart.credits.update({
        position: { y: -25 - yShift, x: -25 - axis.object.axisTitleMargin },
      })
    }
    const hChart = getHighcharts()
    hChart.addEvent(axis.object.chart, "redraw", shiftCredits)
    shiftCredits()
  }, []) // eslint-disable-line
github tlambert03 / FPbase / static / src / fpbase-spectra / Components / SpectraViewer / XRangePickers.jsx View on Github external
placeholder={`${extremes.dataMax || ""}`}
          value={Math.round(max) || ""}
          inputRef={maxNode}
          onChange={e =>
            mutateExtremes({ variables: { extremes: [min, e.target.value] } })
          }
          onKeyPress={handleKeyPress}
          onBlur={updateRange}
          style={{ ...CLASSES.maxInput, color: maxColor }}
          inputProps={{ style: { textAlign: "center" } }}
        />
      
    
  )
}
export default provideAxis(XRangePickers)