From 3cc571566e8df49ffd1283f302a65af4695bd538 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 1 Jun 2020 11:52:03 +0200 Subject: [PATCH 1/2] fix: missing dash style in line annotation --- ...-styling-visually-looks-correct-1-snap.png | Bin 11501 -> 11874 bytes .../renderer/canvas/annotations/lines.ts | 1 + src/utils/themes/theme.ts | 24 ++++++++++++++++-- stories/annotations/lines/5_styling.tsx | 13 +++++----- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-annotations-lines-styling-visually-looks-correct-1-snap.png b/integration/tests/__image_snapshots__/all-test-ts-baseline-visual-tests-for-all-stories-annotations-lines-styling-visually-looks-correct-1-snap.png index b0dea47aaeadcecd61c6ae5e92b6a732569c8774..dd8b86236622f96182b4969e4d246c5a07a6cf65 100644 GIT binary patch literal 11874 zcmb7q2RzmL|NrTB+uBPqizJ0Y85xz*L1YvSqeUpP%dR9U)UmR~u|tIvp;A<4)(N3f zam?%p=l6WO-S79?{oVWh{r~rIANRQDeCGSLp5yJkUtM|rT#mUE3S~ZZuaXvp@*9&v znRa^iOnlSv^i(H4rrBsI@1&%abK)0X3RP)`&iU}}CMVmPp$JwVL(P-Av*)AMl4<^8 z*H-Q?nrVJw|H;@niL-y}6EV1!DxBK$aEWE6nVqiVQPmwQH3#*=PFh*%jwJ3?TCC~y zM!;ZwlKGkAOZjLXe7{@s`HxOcekeY(mRJ1bx|UwGNIx4XlPv=wqxn_VgMofgy|P;i z#n`6dk?yhO){{@l;2!EMd~EcjEx?B!n*bL+?y;-L;KOKhfGs|r9$$|Kr?|h|Uqw#2 zeuq9CA1hkLWEJl{v}j7cc5N<;@ng8Vn#>)_dOb+g zFwLnqPj_orS(g-kRNSjHXcep>KdQ8JomzA>uE(3Kw0r7FVyG`7s0wG=$|Gp>($doC zW=3-}cV*7A%d=)h%pupk;m~)-`)#CA<9*b3;cRV~imU_=r@+emLv0pXYa39(>t$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bTz&1h0xQvaHz_k$eqB=HxRbX?w4Be)O zKN@4wK?opc!JmmAwNg^9(U?i<3pEas6 zLzEpldJLkyZ-6JJ!g({m!I&EB?mX1a0*|P$&p8SS3h1q(sY5xXl9heZ$~=}()9@7s zAPSF+3@u?^L|7P$npXsr;yF|u(4%<5sy`c z(*i)9XO4&h_<-k+#Q{fyLl>M_WV70qfre4U!Lo2*;nYjXx97Z+@QSr7DM~TpXPkki z;qXAgpxbN#Z7SS%?iT3P;wVuAYw}3R!Ko(H$s8qhc6v`(uJS}Rn9NK5uoaWoJa;u3 z>!Ae3YHVZ71=3J)cef6JGB0p!)JBE=EDsjkoej=WAR8#A;{bRYmUo&rwDyp;nr zeZ$ud?ZTYdUqHn8zVG*;c};cYD!_t4l%l=d?Bj#lj3sbhdu4`tejIS}gL`s-uOE6L zI7iBu3KmyCGIxLB@VR?e{j%ZvaNXA`I37Q8G$4vYlSDH^JN~?Bqghvuu{#*mQX?A^ zkJs;(yRBbygHv6oAq0mNEJy0XP`!HaKw{${vg}dKg-PHLfdb}bKye3`raQ;j-%M7{UY$&^(VTh) z5)33qMec@VA?%5V8Y?)`)a-!^K%~2{$ z9;)N^~J+z4@&$wc5>g&fq2^9teZeqO(9)2>FO7)MOhl3%!(Bwi*PsqnE zvRr_C5KAhYUsBnB>UuLW(V#fU-}zGsl+LL>q84 zfFkp~$O-so3vEqi&{|e@=b?jg@DdF6 Miqhq*OSd2V52b- { /** The stroke color in hex, rgba, hsl */ stroke: C; @@ -67,6 +71,10 @@ export interface StrokeStyle { export type TickStyle = StrokeStyle & Visible; +/** + * The dash array for a stroke + * @public + */ export interface StrokeDashArray { /** The dash array for dashed strokes */ dash: number[]; @@ -303,12 +311,24 @@ export interface CrosshairStyle { line: StrokeStyle & Visible & Partial; } +/** + * The style for a linear annotation + * @public + */ export interface LineAnnotationStyle { - line: StrokeStyle & Opacity; + /** + * The style for the line geometry + */ + line: StrokeStyle & Opacity & Partial; + /** + * The style for the text shown on the tooltip + * Currently unused. + * @deprecated + */ details: TextStyle; } -export type RectAnnotationStyle = StrokeStyle & FillStyle & Opacity; +export type RectAnnotationStyle = StrokeStyle & FillStyle & Opacity & Partial; export const DEFAULT_ANNOTATION_LINE_STYLE: LineAnnotationStyle = { line: { diff --git a/stories/annotations/lines/5_styling.tsx b/stories/annotations/lines/5_styling.tsx index 85d23b3cfb..c4aac6d574 100644 --- a/stories/annotations/lines/5_styling.tsx +++ b/stories/annotations/lines/5_styling.tsx @@ -27,6 +27,7 @@ import { LineAnnotationDatum, ScaleType, Settings, + LineAnnotationStyle, } from '../../../src'; import { Icon } from '../../../src/components/icons/icon'; import { getChartRotationKnob } from '../../utils/knobs'; @@ -43,15 +44,15 @@ export const Example = () => { const data = [2.5, 7.2]; const dataValues = generateAnnotationData(data); - const dashWidth = number('dash line width', 1); - const dashGapWidth = number('dash gap width', 0); + const dashWidth = number('dash line width', 5); + const dashGapWidth = number('dash gap width', 8); - const style = { + const style: Partial = { line: { - strokeWidth: number('line stroke width', 3), - stroke: color('line & marker color', '#f00'), + strokeWidth: number('line stroke width', 5), + stroke: color('line & marker color', 'blue'), dash: [dashWidth, dashGapWidth], - opacity: number('line opacity', 1, { + opacity: number('line opacity', 0.5, { range: true, min: 0, max: 1, From 217f713571abb68f71e1849eb65a97cee237c243 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Mon, 1 Jun 2020 11:58:41 +0200 Subject: [PATCH 2/2] docs: update API report --- api/charts.api.md | 19 ++++++------------- src/utils/themes/theme.ts | 6 +++--- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/api/charts.api.md b/api/charts.api.md index 49b3686b35..89f164e3f7 100644 --- a/api/charts.api.md +++ b/api/charts.api.md @@ -764,14 +764,11 @@ export type LineAnnotationSpec = BaseAnnotationSpec; } // Warning: (ae-forgotten-export) The symbol "SpecRequiredProps" needs to be exported by the entry point index.d.ts @@ -1073,7 +1070,7 @@ export type RectAnnotationSpec = BaseAnnotationSpec; // Warning: (ae-missing-release-tag) "RectBorderStyle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1370,16 +1367,12 @@ export const SpecTypes: Readonly<{ // @public (undocumented) export type SpecTypes = $Values; -// Warning: (ae-missing-release-tag) "StrokeDashArray" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export interface StrokeDashArray { dash: number[]; } -// Warning: (ae-missing-release-tag) "StrokeStyle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export interface StrokeStyle { stroke: C; strokeWidth: number; diff --git a/src/utils/themes/theme.ts b/src/utils/themes/theme.ts index 0bb3786988..1353796792 100644 --- a/src/utils/themes/theme.ts +++ b/src/utils/themes/theme.ts @@ -321,9 +321,9 @@ export interface LineAnnotationStyle { */ line: StrokeStyle & Opacity & Partial; /** - * The style for the text shown on the tooltip - * Currently unused. - * @deprecated + * The style for the text shown on the tooltip. + * @deprecated This style is not currently used and will + * soon be removed. */ details: TextStyle; }