diff --git a/src/logic/utils/graph-utils.ts b/src/logic/utils/graph-utils.ts index b2242e2..99bc6fb 100644 --- a/src/logic/utils/graph-utils.ts +++ b/src/logic/utils/graph-utils.ts @@ -70,4 +70,21 @@ export default class GraphUtils ] } } + + /** + * Text style for pie graphs or radar graphs + */ + static pieTextStyle() + { + return { + fontSize: 14, + textShadowColor: '#cfcfcf', + textShadowBlur: 2, + textShadowOffsetX: 1, + textShadowOffsetY: 1, + backgroundColor: '#f6f6f6', + borderRadius: 3, + padding: [3, 5] + } + } } diff --git a/src/pages/course/type-radar/type-radar.ts b/src/pages/course/type-radar/type-radar.ts index 72d1fba..d0faf05 100644 --- a/src/pages/course/type-radar/type-radar.ts +++ b/src/pages/course/type-radar/type-radar.ts @@ -37,18 +37,7 @@ export default class TypeRadar extends Vue // shape: 'circle', name: { - textStyle: - { - fontSize: 14, - textShadowColor: '#cfcfcf', - textShadowBlur: 2, - textShadowOffsetX: 1, - textShadowOffsetY: 1, - color: '#fff', - backgroundColor: '#f6f6f6', - borderRadius: 3, - padding: [3, 5] - } + textStyle: GraphUtils.pieTextStyle() }, splitArea: {