Skip to content

[UIK-4742][d3-chart] add minimalBarWidth property for Cigarette chart#2714

Open
slizhevskyv-semrush wants to merge 3 commits intorelease/v16from
UIK-4742/minimal-bar-width-for-cigarette
Open

[UIK-4742][d3-chart] add minimalBarWidth property for Cigarette chart#2714
slizhevskyv-semrush wants to merge 3 commits intorelease/v16from
UIK-4742/minimal-bar-width-for-cigarette

Conversation

@slizhevskyv-semrush
Copy link
Contributor

Changelog

@semcore/d3-chart

Added

  • minimalBarWidth for Cigarette chart.

Motivation and Context

Added minimalBarWidth property for Cigarette chart.

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Nice improve.

Checklist:

  • I have updated the documentation accordingly.
  • I have added new tests on added of fixed functionality.

dataDefinitions: this.getDefaultDataDefinitions(),
highlightedLine: -1,
withTrend: false,
} as State;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove as

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's needed since ts initializes state as literal object with type { highlightedLine: -1,... rather than { highlightedLine: number,...}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.state: State = {...}; ?

because with as solution, you can set highlightedLine: 'qwe' for example =)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you cannot define type of the variable inside constructor like this :)
yeah, you are right, it's a bit unsafe but looks like it's the only possible solution here :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants