diff --git a/src/app/components/analysis-panel/analysis-panel.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts index ab8bbb4e14090f7600eb3cdc1f6c11c74ea9c22f..83a8441433f2b006bf91ee44b8de8411df429776 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.ts @@ -31,7 +31,7 @@ import {NetworkSettings} from '../../network-settings'; import {NetexControllerService} from 'src/app/services/netex-controller/netex-controller.service'; import {defaultConfig, IConfig} from 'src/app/config'; import { mapCustomEdge, mapCustomNode } from 'src/app/main-network'; -import { downLoadFile, removeDuplicateObjectsFromList } from 'src/app/utils'; +import { downLoadFile, pieChartContextRenderer, removeDuplicateObjectsFromList } from 'src/app/utils'; declare var vis: any; @@ -801,7 +801,8 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { isSeed, this.analysis.inSelection(wrapper), this.gradientMap[netexId])); - node.gradient = this.gradientMap[netexId]; + node.shape = 'custom'; + node.ctxRenderer = pieChartContextRenderer; updatedNodes.push(node); } this.nodeData.nodes.update(updatedNodes); diff --git a/src/app/pages/explorer-page/explorer-page.component.ts b/src/app/pages/explorer-page/explorer-page.component.ts index 2ea6812fc1e54cec65c1f45b363c3cd4e90f82c1..820607444e86fa731387b669e56bd0d8c4fddf45 100644 --- a/src/app/pages/explorer-page/explorer-page.component.ts +++ b/src/app/pages/explorer-page/explorer-page.component.ts @@ -803,7 +803,6 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { gradient)); // try out custom ctx renderer - // node.gradient = gradient; node.shape = 'custom'; node.ctxRenderer = pieChartContextRenderer; updatedNodes.push(node); diff --git a/src/app/utils.ts b/src/app/utils.ts index 4fbbd0c13321f74d27a72c5eb34f713439fa78da..8fe3cdb9449d8b844b01d0e4daa7b23be57c1982 100644 --- a/src/app/utils.ts +++ b/src/app/utils.ts @@ -134,7 +134,8 @@ export function downLoadFile(data: any, type: string, fmt: string) { } export function pieChartContextRenderer({ ctx, x, y, state: { selected, hover }, style, label }) { - ctx.drawPieLabel = function(style, x, y, label) { + console.log(style) + ctx.drawPieLabel = function(style, x, y, label) { ctx.font = "normal 12px sans-serif"; ctx.textAlign = "center"; ctx.textBaseline = "middle"; diff --git a/src/stylesheets/styles.scss b/src/stylesheets/styles.scss index db064d85ec7b02edfb6707eebf8456c49b1193da..36d15ea284d35ea0ef72ffc5c962a66df6b44707 100644 --- a/src/stylesheets/styles.scss +++ b/src/stylesheets/styles.scss @@ -108,7 +108,7 @@ height: $height; overflow-y: auto; overflow-x: hidden; - max-width: $sidebar-max-width; + max-width: $sidebar-width; min-width: $sidebar-min-width; height: 100%; /* Hide scrollbar for Chrome, Safari and Opera */ @@ -118,6 +118,9 @@ /* Hide scrollbar for IE, Edge and Firefox */ -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ + @media only screen and (min-width: 1400px) { + max-width: $sidebar-max-width; + } } div.card.bar-small { diff --git a/src/stylesheets/variables.scss b/src/stylesheets/variables.scss index 7931dc94beac2b62d00848624520c27840816dbb..f4ca8471508eac481ec11767b5f0364914c59fe9 100644 --- a/src/stylesheets/variables.scss +++ b/src/stylesheets/variables.scss @@ -34,7 +34,8 @@ $legend-diamond-size: 25px; $height: 100%; -$sidebar-max-width: 25%; +$sidebar-width: 25%; +$sidebar-max-width: 350px; $sidebar-min-width: 240px; // settings for different screen sizes