Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Histogram Zoom Preview on Study View #4957

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

olzhasmukayev
Copy link
Contributor

@olzhasmukayev olzhasmukayev commented Aug 1, 2024

Add Histogram Zoom Preview:
image

Copy link

netlify bot commented Aug 1, 2024

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit d1e0799
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/66c427fbd5968500085b1b65
😎 Deploy Preview https://deploy-preview-4957--cbioportalfrontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

<FlexAlignedCheckbox
checked={
!!(
this.props.chartControls &&
Copy link
Contributor

Choose a reason for hiding this comment

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

simplify to !!this.props.chartControls?.showPreview

Comment on lines 630 to 639
if (this._customDataBinFilterSet.has(uniqueKey)) {
const filter = this._customDataBinFilterSet.get(uniqueKey);
return filter === undefined
? false
: (filter!.showPreview as boolean);
} else {
const filter = this.getDataBinFilterSet(uniqueKey).get(uniqueKey)!;
return filter?.showPreview === undefined
? false
: (filter!.showPreview as boolean);
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this could be simplified. one way could be to use ternary operator (n ? x : y) to get the filter and something like return filter?.showPreview || false for the return value

@@ -74,7 +84,37 @@ export default class BarChart extends React.Component<IBarChartProps, {}>

constructor(props: IBarChartProps) {
super(props);
this.state = {
Copy link
Contributor

@gblaih gblaih Aug 8, 2024

Choose a reason for hiding this comment

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

we mainly use mobx for state management so instead of this.state and setState we use decorators like @observable and @action. can we look into this and see if we can do that?

Comment on lines 102 to 111
if (!domain || !domain.x) {
console.error('Brush domain is not defined.');
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

lets remove this and just check if domain and domain.x are defined and if so do the actions below.

@inodb inodb changed the title feat: add bar chart zoom preview Add Histogram Zoom Preview on Study View Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants