API Reference > imodeljs-frontend > Views > Viewport > addOnAnalysisStyleChangedListener addOnAnalysisStyleChangedListener Method Add an event listener to be invoked whenever the AnalysisStyle associated with this viewport changes. The analysis style may change for any of several reasons: When the viewport's associated DisplayStyleSettings.analysisStyle. When the viewport's associated ViewState.displayStyle changes. When the viewport's associated ViewState changes via Viewport.changeView. addOnAnalysisStyleChangedListener(listener: (newStyle: undefined | AnalysisStyle) => void): () => void Parameter Type Description listener (newStyle: undefined | AnalysisStyle) => void Callback accepting the new analysis style, or undefined if there is no analysis style. Returns - () => void A function that can be invoked to remove the event listener. Defined in core/frontend/src/Viewport.ts Line 2605 Last Updated: 12 June, 2024