Skip to content

Commit

Permalink
feat(chart): fixed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SNosenko authored and SNosenko committed Sep 29, 2021
2 parents 555acb6 + 379e53d commit 7ad1caf
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
8 changes: 3 additions & 5 deletions packages/chart/src/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import { TooltipContent } from './components/TooltipContent';
import styles from './index.module.css';

const Chart = (props: OptionsProps) => {
const [get, set] = useSettings(props);
const { state, data, charts, filterCount } = get;
const { setCharts, setFilterCount } = set;
const [{ state, data, charts, filterCount }, { setCharts, setFilterCount }] = useSettings(
props,
);
const [activeDotsState, setActiveDotsState] = useState<ActiveDotProps>({
prev: null,
active: null,
Expand Down Expand Up @@ -342,8 +342,6 @@ const Chart = (props: OptionsProps) => {

if (!data || !charts || !state) return null;

console.log('state.series: ', state.series);

return (
<div
className={styles.coreChart}
Expand Down
5 changes: 5 additions & 0 deletions packages/chart/src/components/Tick/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
opacity: 0.3;
fill: var(--color-dark-bg-primary);
}

.circle {
opacity: 0.3;
fill: var(--color-dark-bg-primary);
}
8 changes: 7 additions & 1 deletion packages/chart/src/icons/Circle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ type Props = {

export const CircleIcon = ({ fill = '#FF5C5C', height = 16 }: Props) => {
return (
<svg xmlns='http://www.w3.org/2000/svg' height={height} viewBox='0 0 16 16' fill='none'>
<svg
xmlns='http://www.w3.org/2000/svg'
width='auto'
height={height}
viewBox='0 0 16 16'
fill='none'
>
<circle cx='8' cy='8' r='8' fill={fill} />
</svg>
);
Expand Down
8 changes: 7 additions & 1 deletion packages/chart/src/icons/CircleLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ type Props = {

export const CircleLineIcon = ({ fill = '#FF5C5C', height = 16 }: Props): React.ReactElement => {
return (
<svg xmlns='http://www.w3.org/2000/svg' height={height} viewBox='0 0 22 12' fill='none'>
<svg
xmlns='http://www.w3.org/2000/svg'
width='auto'
height={height}
viewBox='0 0 22 12'
fill='none'
>
<circle cx='11' cy='6' r='6' fill={fill} />
<rect y='5' width='22' height='2' fill={fill} />
</svg>
Expand Down
8 changes: 7 additions & 1 deletion packages/chart/src/icons/StrokeCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ type Props = {

export const StrokeCircleIcon = ({ fill = '#5A8ECF', height = 16 }: Props) => {
return (
<svg xmlns='http://www.w3.org/2000/svg' height={height} viewBox='0 0 22 22' fill='none'>
<svg
xmlns='http://www.w3.org/2000/svg'
width='auto'
height={height}
viewBox='0 0 22 22'
fill='none'
>
<circle cx='11' cy='11' r='10' stroke={fill} strokeWidth='2' strokeDasharray='8 8' />
</svg>
);
Expand Down

0 comments on commit 7ad1caf

Please sign in to comment.