import Chart from './chart' ; import heatmapAxes from '@src/store/heatmapAxes' ; import heatmapSeriesData from '@src/store/heatmapSeriesData' ; import colorValueScale from '@src/store/colorValueScale' ; import Tooltip from '@src/component/tooltip' ; import Title from '@src/component/title' ; import ExportMenu from '@src/component/exportMenu' ; import HoveredSeries from '@src/component/hoveredSeries' ; import DataLabels from '@src/component/dataLabels' ; import SpectrumLegend from '@src/component/spectrumLegend' ; import HeatmapSeries from '@src/component/heatmapSeries' ; import AxisTitle from '@src/component/axisTitle' ; import Axis from '@src/component/axis' ; import SelectedSeries from '@src/component/selectedSeries' ; import Background from '@src/component/background' ; import NoDataText from '@src/component/noDataText' ; import * as basicBrush from '@src/brushes/basic' ; import * as legendBrush from '@src/brushes/legend' ; import * as labelBrush from '@src/brushes/label' ; import * as exportMenuBrush from '@src/brushes/exportMenu' ; import * as dataLabelBrush from '@src/brushes/dataLabel' ; import * as spectrumLegendBrush from '@src/brushes/spectrumLegend' ; import * as axisBrush from '@src/brushes/axis' ; import { HeatmapCategoriesType , HeatmapChartOptions , HeatmapSeriesData , HeatmapSeriesDataType , } from '@t/options' ; import { HeatmapChartProps , AddSeriesDataInfo , SelectSeriesInfo } from '@t/charts' ; function getSeriesWithYCategory ( series , categories ) { return series . map ( ( rowSeries , y ) => ( { data : rowSeries , yCategory : categories . y [ y ] , } ) ) ; } class classdesc param props param { HTMLElement } props . el param props . data param props . data . categories param { Array < string > } props . data . categories . x param { Array < string > } props . data . categories . y param { Array < Array < number > > } props . data . series param props . options param props . options . chart param { string | Object } props . options . chart . title param { string } props . options . chart . title . text param { number } props . options . chart . title . offsetX param { number } props . options . chart . title . offsetY param { string } props . options . chart . title . align param { boolean | Object } props . options . chart . animation param { number | string } props . options . chart . width param { number | string } props . options . chart . height param props . options . series param { boolean } props . options . series . selectable param { boolean } props . options . series . shift param { Object } props . options . series . dataLabels - Set the visibility, location, and formatting of dataLabel. For specific information, refer to the  https on github.
 *      param props . options . xAxis param { string | Object } props . options . xAxis . title param { boolean } props . options . xAxis . rotateLabel param { boolean | Object } props . options . xAxis . date param { Object } props . options . xAxis . tick param { Object } props . options . xAxis . label param { Object } props . options . xAxis . scale param { number } props . options . xAxis . width param { number } props . options . xAxis . height param { Object | Array < Object > } props . options . yAxis param { string | Object } props . options . yAxis . title param { boolean | Object } props . options . yAxis . date param { Object } props . options . yAxis . tick param { Object } props . options . yAxis . label param { Object } props . options . yAxis . scale param { number } props . options . yAxis . width param { number } props . options . yAxis . height param props . options . plot param { number } props . options . plot . width param { number } props . options . plot . height param { boolean } props . options . plot . visible param props . options . legend param { string } props . options . legend . align param { boolean } props . options . legend . visible param { number } props . options . legend . width param props . options . exportMenu param { boolean } props . options . exportMenu . visible param { string } props . options . exportMenu . filename param props . options . tooltip param { number } props . options . tooltip . offsetX param { number } props . options . tooltip . offsetY param { Function } props . options . tooltip . formatter param { Function } props . options . tooltip . template - Function to create custom template. For specific information, refer to the  https on github.
 *      param props . options . responsive param { boolean | Object } props . options . responsive . animation param { Array < Object > } props . options . responsive . rules - Rules for changing chart options. For specific information, refer to the  https on github.
 *        param props . options . lang param { Object } props . options . lang . noData param props . options . theme param { Object } props . options . theme . chart param { Object } props . options . theme . noData param { Object } props . options . theme . series param { Object } props . options . theme . title param { Object } props . options . theme . xAxis param { Object } props . options . theme . yAxis param { Object } props . options . theme . legend param { Object } props . options . theme . tooltip param { Object } props . options . theme . plot param { Object } props . options . theme . exportMenu - Chart theme options. For specific information, refer to the  https on github.
 *        extends Chart export default class HeatmapChart extends Chart < HeatmapChartOptions > { constructor ( props ) { super ( { el : props . el , categories : props . data . categories as HeatmapCategoriesType , options : props . options , series : { heatmap : getSeriesWithYCategory ( props . data . series , props . data . categories ) , } , modules : [ heatmapSeriesData , colorValueScale , heatmapAxes ] , } ) ; } protected initialize ( ) { super . initialize ( ) ; this . componentManager . add ( Background ) ; this . componentManager . add ( Title ) ; this . componentManager . add ( SpectrumLegend ) ; this . componentManager . add ( ExportMenu , { chartEl : this . el } ) ; this . componentManager . add ( HeatmapSeries ) ; this . componentManager . add ( Axis , { name : 'yAxis' } ) ; this . componentManager . add ( Axis , { name : 'xAxis' } ) ; this . componentManager . add ( AxisTitle , { name : 'xAxis' } ) ; this . componentManager . add ( AxisTitle , { name : 'yAxis' } ) ; this . componentManager . add ( HoveredSeries ) ; this . componentManager . add ( SelectedSeries ) ; this . componentManager . add ( DataLabels ) ; this . componentManager . add ( Tooltip , { chartEl : this . el } ) ; this . componentManager . add ( NoDataText ) ; this . painter . addGroups ( [ basicBrush , axisBrush , legendBrush , labelBrush , exportMenuBrush , dataLabelBrush , spectrumLegendBrush , ] ) ; } param { Array } data param { string } category api example addData ( data , category ) { this . animationControlFlag . updating = true ; this . resetSeries ( ) ; this . store . dispatch ( 'addData' , { data , category } ) ; } param data param { string } data . name param { Array < number > } data . data param dataInfo param { Object } dataInfo . category api example addSeries ( data , dataInfo ) { this . resetSeries ( ) ; this . store . dispatch ( 'addHeatmapSeries' , { data , ... dataInfo } ) ; } param { Object } data param { Array < string > } data . categories . x param { Array < string > } data . categories . y param { Array < Array < number > > } data . series api example setData ( data ) { const { categories , series } = data ; this . resetSeries ( ) ; this . store . dispatch ( 'setData' , { series : { heatmap : getSeriesWithYCategory ( series , categories ) } , categories , } ) ; } api example hideSeriesDataLabel ( ) { this . store . dispatch ( 'updateOptions' , { options : { series : { dataLabels : { visible : false } } } , } ) ; } api example showSeriesDataLabel ( ) { this . store . dispatch ( 'updateOptions' , { options : { series : { dataLabels : { visible : true } } } , } ) ; } param { Object } options api example setOptions ( options ) { this . resetSeries ( ) ; this . dispatchOptionsEvent ( 'initOptions' , options ) ; } param { Object } options api example updateOptions ( options ) { this . resetSeries ( ) ; this . dispatchOptionsEvent ( 'updateOptions' , options ) ; } param seriesInfo param { number } seriesInfo . seriesIndex param { number } seriesInfo . index api example showTooltip ( seriesInfo ) { this . eventBus . emit ( 'showTooltip' , { ... seriesInfo , state : this . store . state } ) ; } api example hideTooltip ( ) { this . eventBus . emit ( 'hideTooltip' ) ; } }