Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SeparationLineComponent for visual separation in charts #419

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/item-detail/item-detail.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { ThresholdFailureComponent } from "./request-stats/threshold-failure/thr
import { ZoomChartsComponent } from "./zoom-charts/zoom-charts.component";
import { ErrorSummaryComponent } from "./error-summary/error-summary.component";
import { ValidationsModule } from "./validations/validations.module";
import { SeparationLineComponent } from "./separation-line/separation-line.component";


const routes: Routes = [{
Expand All @@ -43,7 +44,7 @@ const routes: Routes = [{
declarations: [ItemDetailComponent, RequestStatsComponent, ThresholdsAlertComponent,
PerformanceAnalysisComponent, LabelChartComponent, AnalyzeChartsComponent,
LabelHealthComponent, LabelTrendComponent, StatsCompareComponent, AddMetricComponent, ShareComponent, DeleteShareLinkComponent,
CreateNewShareLinkComponent, MonitoringStatsComponent, ReloadCustomChartComponent, ChartIntervalComponent, ForbiddenComponent, ThresholdFailureComponent, ZoomChartsComponent, ErrorSummaryComponent],
CreateNewShareLinkComponent, MonitoringStatsComponent, ReloadCustomChartComponent, ChartIntervalComponent, ForbiddenComponent, ThresholdFailureComponent, ZoomChartsComponent, ErrorSummaryComponent, SeparationLineComponent],
imports: [
CommonModule, NgbModule, RouterModule.forRoot(routes), DataTableModule, SharedItemModule, SharedModule, HighchartsChartModule, ValidationsModule,
ReactiveFormsModule, FormsModule, RoleModule,
Expand Down
4 changes: 4 additions & 0 deletions src/app/item-detail/label-chart/label-chart.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ <h6 class="card-header bg-transparent">
<highcharts-chart #labelChart [Highcharts]="Highcharts" [options]="labelChartOptions" [callbackFunction]="chartCallback" [(update)]="updateLabelChartFlag"
class="highchart-chart"
style="width: 100%; height: 100%; display: block;"></highcharts-chart>

<app-separation-line *ngIf="comparisonLabelChartOptions"></app-separation-line>

<div *ngIf="comparisonLabelChartOptions">

<highcharts-chart #labelComparisonChart [Highcharts]="Highcharts" [options]="comparisonLabelChartOptions" [callbackFunction]="comparisonChartCallback" [(update)]="updateLabelChartFlag"
class="highchart-chart"
style="width: 100%; height: 100%; display: block;"></highcharts-chart>
Expand Down
29 changes: 29 additions & 0 deletions src/app/item-detail/separation-line/separation-line.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

.separation-line {
overflow: hidden;
text-align: center;
margin-top: 1.5rem;
margin-bottom: 0.8rem;
}

.separation-line::before,
.separation-line::after {
content: "";
display: inline-block;
height: 2px;
position: relative;
vertical-align: middle;
width: 50%;
border: none;
border-top: 1px dotted #a1b3df;
}

.separation-line::before {
right: 0.5em;
margin-left: -50%;
}

.separation-line::after {
left: 0.5em;
margin-right: -50%;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h6 class="separation-line">Comparing Chart</h6>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from "@angular/core/testing";

import { SeparationLineComponent } from "./separation-line.component";

describe("SeparationLineComponent", () => {
let component: SeparationLineComponent;
let fixture: ComponentFixture<SeparationLineComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [SeparationLineComponent]
})
.compileComponents();

fixture = TestBed.createComponent(SeparationLineComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it("should create", () => {
expect(component).toBeTruthy();
});
});
10 changes: 10 additions & 0 deletions src/app/item-detail/separation-line/separation-line.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from "@angular/core";

@Component({
selector: 'app-separation-line',
templateUrl: './separation-line.component.html',
styleUrls: ['./separation-line.component.css']
})
export class SeparationLineComponent {

}
Loading