Skip to content

Commit

Permalink
Adapt breaking changes in charts library
Browse files Browse the repository at this point in the history
  • Loading branch information
Tugark committed Mar 4, 2024
1 parent 2691135 commit 5a21620
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import {ElevationProfileData, ElevationProfileDataPoint} from '../../../../share
import {ElevationProfileChartJsDataConfiguration} from './types/chartjs.type';
import {ElevationPlotConfigService} from './services/elevation-plot-config.service';
import {ElevationProfileChartJsOptions} from './interfaces/chartjs.interface';
import {BaseChartDirective} from 'ng2-charts';

const VERTIXAL_AXIS_LABEL = 'MüM';

@Component({
standalone: true,
selector: 'elevation-profile-chart',
templateUrl: './elevation-profile-chart.component.html',
styleUrls: ['./elevation-profile-chart.component.scss'],
imports: [BaseChartDirective],
})
export class ElevationProfileChartComponent implements OnInit {
@Input() public elevationProfileData!: ElevationProfileData;
Expand Down
8 changes: 4 additions & 4 deletions src/app/map/map.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ import {ProductComponent} from './components/map-tools/product/product.component
import {DataDownloadFilterDialogComponent} from './components/map-tools/data-download-filter-dialog/data-download-filter-dialog.component';
import {DataDownloadEmailDialogComponent} from './components/map-tools/data-download-email-dialog/data-download-email-dialog.component';
import {ElevationProfileOverlayComponent} from './components/elevation-profile-overlay/elevation-profile-overlay.component';
import {NgChartsModule} from 'ng2-charts';
import {ElevationProfileChartComponent} from './components/elevation-profile-overlay/elevation-profile-chart/elevation-profile-chart.component';
import {ElevationProfileStatisticsComponent} from './components/elevation-profile-overlay/elevation-profile-statistics/elevation-profile-statistics.component';
import {DataDownloadEmailConfirmationDialogComponent} from './components/map-tools/data-download-email-confirmation-dialog/data-download-email-confirmation-dialog.component';
import {DataDownloadStatusQueueComponent} from './components/map-tools/data-download-status-queue/data-download-status-queue.component';
Expand All @@ -86,8 +84,11 @@ import {MapAttributeFilterOverlayComponent} from './components/map-attribute-fil
import {DelayedMouseEnterDirective} from '../shared/directives/delayed-mouse-enter.directive';
import {DisableOverscrollBehaviourComponent} from './components/disable-overscroll-behaviour/disable-overscroll-behaviour.component';
import {NotificationIndicatorComponent} from './components/notification-indicator/notification-indicator.component';
import {ElevationProfileChartComponent} from './components/elevation-profile-overlay/elevation-profile-chart/elevation-profile-chart.component';
import {provideCharts, withDefaultRegisterables} from 'ng2-charts';

@NgModule({
providers: [provideCharts(withDefaultRegisterables())],
declarations: [
MapPageComponent,
MapContainerComponent,
Expand Down Expand Up @@ -152,7 +153,6 @@ import {NotificationIndicatorComponent} from './components/notification-indicato
DataDownloadFilterDialogComponent,
DataDownloadEmailDialogComponent,
ElevationProfileOverlayComponent,
ElevationProfileChartComponent,
ElevationProfileStatisticsComponent,
DataDownloadEmailConfirmationDialogComponent,
DataDownloadStatusQueueComponent,
Expand All @@ -168,7 +168,6 @@ import {NotificationIndicatorComponent} from './components/notification-indicato
OnboardingGuideModule,
FormsModule,
ReactiveFormsModule,
NgChartsModule,
MapImportServiceAndUrlComponent,
MapImportLayerListComponent,
MapImportDisplayNameComponent,
Expand All @@ -180,6 +179,7 @@ import {NotificationIndicatorComponent} from './components/notification-indicato
DelayedMouseEnterDirective,
DisableOverscrollBehaviourComponent,
NotificationIndicatorComponent,
ElevationProfileChartComponent,
],
exports: [LegendOverlayComponent, FeatureInfoOverlayComponent, MapContainerComponent, ZoomControlsComponent, MapOverlayComponent],
})
Expand Down

0 comments on commit 5a21620

Please sign in to comment.