Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/polaris-viz

Package Overview
Dependencies
Maintainers
19
Versions
347
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/polaris-viz - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

esnext/components/BarChart/components/AnnotationLine/AnnotationLine.esnext

9

CHANGELOG.md
# Changelog
## Unreleased
## [0.9.1] — 2021-04-27
### Added
- `<Sparkbar />` component
- Annotations prop to `<BarChart />`
## [0.9.0] — 2021-04-26

@@ -4,0 +13,0 @@

3

package.json
{
"name": "@shopify/polaris-viz",
"description": "Shopify’s viz component library",
"version": "0.9.0",
"version": "0.9.1",
"private": false,

@@ -19,2 +19,3 @@ "license": "SEE LICENSE IN LICENSE.md",

"test:coverage": "CI=true yarn test --coverage",
"test:debug:chrome": "osascript -e 'tell app \"Google Chrome\" to open location \"chrome://inspect\"' && sewing-kit-debug test --debug",
"posttest:coverage": "yarn open:coverage",

@@ -21,0 +22,0 @@ "open:coverage": "open build/coverage/index.html",

import React from 'react';
import { Data } from 'types';
import { RenderTooltipContentData, BarOptions, GridOptions, XAxisOptions, YAxisOptions } from './types';
import { RenderTooltipContentData, BarOptions, GridOptions, XAxisOptions, YAxisOptions, Annotation } from './types';
export interface BarChartProps {
data: Data[];
annotations?: Annotation[];
skipLinkText?: string;

@@ -15,2 +16,2 @@ emptyStateText?: string;

}
export declare function BarChart({ data, renderTooltipContent, emptyStateText, isAnimated, skipLinkText, barOptions, gridOptions, xAxisOptions, yAxisOptions, }: BarChartProps): JSX.Element;
export declare function BarChart({ data, annotations, renderTooltipContent, emptyStateText, isAnimated, skipLinkText, barOptions, gridOptions, xAxisOptions, yAxisOptions, }: BarChartProps): JSX.Element;
import React from 'react';
import { Data } from '../../types';
import { RenderTooltipContentData, BarOptions, GridOptions, XAxisOptions, YAxisOptions } from './types';
import { RenderTooltipContentData, BarOptions, GridOptions, XAxisOptions, YAxisOptions, AnnotationLookupTable } from './types';
interface Props {
data: Data[];
annotationsLookupTable: AnnotationLookupTable;
chartDimensions: DOMRect;

@@ -17,3 +18,3 @@ renderTooltipContent: (data: RenderTooltipContentData) => React.ReactNode;

}
export declare function Chart({ data, chartDimensions, renderTooltipContent, emptyStateText, isAnimated, barOptions, gridOptions, xAxisOptions, yAxisOptions, }: Props): JSX.Element;
export declare function Chart({ data, annotationsLookupTable, chartDimensions, renderTooltipContent, emptyStateText, isAnimated, barOptions, gridOptions, xAxisOptions, yAxisOptions, }: Props): JSX.Element;
export {};
export { TooltipContent, TooltipContentProps } from './TooltipContent';
export { AnnotationLine } from './AnnotationLine';
/// <reference types="react" />
import { Annotation } from '../../types';
export interface TooltipContentProps {
label: string;
value: string;
annotation?: Annotation;
}
export declare function TooltipContent({ label, value }: TooltipContentProps): JSX.Element;
export declare function TooltipContent({ label, value, annotation, }: TooltipContentProps): JSX.Element;

@@ -11,2 +11,3 @@ import { Color, StringLabelFormatter, NumberLabelFormatter } from 'types';

value: number;
annotation?: Annotation;
}

@@ -33,1 +34,15 @@ export interface BarOptions {

}
export interface Annotation {
dataIndex: number;
width: number;
color: string;
tooltipData?: {
label: string;
value: string;
};
ariaLabel?: string;
xOffset?: number;
}
export interface AnnotationLookupTable {
[key: number]: Annotation;
}

@@ -5,2 +5,3 @@ export { Point } from './Point';

export { Sparkline, SparklineProps } from './Sparkline';
export { Sparkbar, SparkbarProps } from './Sparkbar';
export { BarChart, BarChartProps, BarChartTooltipContent, BarChartTooltipContentProps, } from './BarChart';

@@ -7,0 +8,0 @@ export { LineChart, LineChartProps, LineChartTooltipContent, LineChartTooltipContentProps, } from './LineChart';

@@ -1,2 +0,1 @@

export { LinearGradient } from './LinearGradient';
export { Series } from './Series';

@@ -1,1 +0,1 @@

export { Sparkline, SparklineProps, NormalizedStackedBarChart, NormalizedStackedBarChartProps, BarChart, BarChartProps, BarChartTooltipContent, BarChartTooltipContentProps, LineChart, LineChartProps, LineChartTooltipContent, LineChartTooltipContentProps, StackedAreaChart, StackedAreaChartProps, Legend, MultiSeriesBarChart, MultiSeriesBarChartProps, TooltipContent, TooltipContentProps, LinePreview, SquareColorPreview, } from './components';
export { Sparkline, SparklineProps, Sparkbar, SparkbarProps, NormalizedStackedBarChart, NormalizedStackedBarChartProps, BarChart, BarChartProps, BarChartTooltipContent, BarChartTooltipContentProps, LineChart, LineChartProps, LineChartTooltipContent, LineChartTooltipContentProps, StackedAreaChart, StackedAreaChartProps, Legend, MultiSeriesBarChart, MultiSeriesBarChartProps, TooltipContent, TooltipContentProps, LinePreview, SquareColorPreview, } from './components';
import { Color } from 'types';
export declare function isValidColorToken(color: Color): boolean;
export declare function getColorValue(color: Color): string;

@@ -19,1 +19,2 @@ export { eventPoint } from './event-point';

export { getPointAtLength } from './get-point-at-length';
export { normalizeData } from './normalize-data';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc