This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AccessibilityModule from 'highcharts/modules/accessibility'; | |
AccessibilityModule(Highcharts); | |
const options = { | |
accessibility: { | |
description: 'Chart showing sales trends over time', | |
announceNewData: { | |
enabled: true, | |
announcementFormatter: function (allSeries, newSeries, newPoint) { | |
if (newPoint) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const options1 = { | |
responsive: { | |
rules: [{ | |
condition: { | |
maxWidth: 500 | |
}, | |
chartOptions: { | |
legend: { | |
layout: 'horizontal', | |
align: 'center', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const options = { | |
chart: { | |
events: { | |
load: function() { | |
// Chart loaded callback | |
console.log('Chart loaded'); | |
}, | |
redraw: function() { | |
// Chart redrawn callback | |
console.log('Chart redrawn'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Highcharts from 'highcharts'; | |
import HighchartsReact from 'highcharts-react-official'; | |
export const GaugeChart = () => { | |
const options = { | |
chart: { | |
type: 'gauge', | |
plotBorderWidth: 0, | |
plotShadow: false | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Basic Usage | |
import Highcharts from 'highcharts'; | |
Highcharts.setOptions({ | |
// Global options that apply to all charts | |
chart: { | |
style: { | |
fontFamily: '"Arial", sans-serif' | |
} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Highcharts from 'highcharts'; | |
import HighchartsReact from 'highcharts-react-official'; | |
const LineChart = () => { | |
const options = { | |
chart: { | |
type: 'line' | |
}, | |
title: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Highcharts dependencies | |
# npm command | |
npm install highcharts highcharts-react-official | |
# yarn command | |
yarn add highcharts highcharts-react-official |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useGetLatestReleaseQuery } from './home-service' | |
export function Home() { | |
const { data, isLoading, isFetching } = useGetLatestReleaseQuery() | |
if (isLoading) return <div>Loading...</div> | |
if (isFetching) return <div>Fetching...</div> | |
if (data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { applicationApi } from '../../store/service' | |
import { LatestRelease } from './home-type' | |
const homeService = applicationApi.injectEndpoints({ | |
endpoints: (build) => ({ | |
getLatestRelease: build.query<LatestRelease, void>({ | |
query: () => ({ | |
url: '/release/latest', | |
method: 'GET', | |
}), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import ReactDOM from 'react-dom/client' | |
import App from './App' | |
import reportWebVitals from './reportWebVitals' | |
import './styles/index.css' | |
import { Provider } from 'react-redux' | |
import { store } from './store/store' | |
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement) | |
root.render( |
NewerOlder