Skip to content

DM-8006 Add xy chart to phase folding parameter setting panel using Highcharts #229

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

Merged
merged 4 commits into from
Nov 17, 2016

Conversation

cwang2016
Copy link
Contributor

The implementation mainly,

  • add 2D chart on the client side phase folding dialog and the plot changes as any of the phase folding parameters (time column, flux column, zero time point, period) changes.
  • update the parameter items in the parameter setting dialog.

Test:

  • localhost:8080/firefly/lc.html
  • open 'lc_raw.tbl' from 'Raw Table', click 'search'
  • select tab 'Upload/Phase folding' and click button 'Phase Folding'
  • experiment the setting of all entries and move slider to set 'period', the plot will be updated as any of the parameter (except Flux error column) changes
  • click button 'Phase Folded Table' to close the dialog and a table with phase column is created (or updated) based on current setting of period, time column and zero point time.

Note:

  • The time and flux column names are set in default for IRSA cases. Those column names are settable while the phase folding dialog component is used.

Copy link
Contributor

@tgoldina tgoldina left a comment

Choose a reason for hiding this comment

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

My major concern is that the chart is being rerendered on mouse moves (readout actions) outside the popup. It should only re-render when the data change.

this.state = {
fields,
config: {
chart: {
Copy link
Contributor

Choose a reason for hiding this comment

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

You might want to remove Highcharts.com from the chart corner by adding credits: {enabled: false} to the config

@@ -23,16 +23,21 @@ import {dispatchTableSearch} from '../../tables/TablesCntlr.js';
import Validate from '../../util/Validate.js';
import {LcPFOptionsPanel} from './LcPhaseFoldingPanel.jsx';
Copy link
Contributor

Choose a reason for hiding this comment

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

not used

@@ -23,16 +23,21 @@ import {dispatchTableSearch} from '../../tables/TablesCntlr.js';
import Validate from '../../util/Validate.js';
import {LcPFOptionsPanel} from './LcPhaseFoldingPanel.jsx';
import {RAW_TABLE, PHASE_FOLDED} from './LcManager.js';
import ReactHighcharts from 'react-highcharts';
import {cloneDeep, get, set, omit, slice, replace, isNil} from 'lodash';
Copy link
Contributor

Choose a reason for hiding this comment

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

isNil is not used

/**
* @summary 2D xyplot component on phase folding panel
*/
class PhaseFoldingChart extends Component {
Copy link
Contributor

Choose a reason for hiding this comment

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

PhaseFoldingChart.propTypes for property validation might be useful

width
},
title: {
text: 'Flux vs. Phase'
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just my opinion: I think this title does not add any new info. Also, title and legend together take too much space from the chart. I would put Period=... in the title, and remove legend.

…ormance.

update the precision of the number displayed on the slide bar.
@ejoliet
Copy link
Contributor

ejoliet commented Nov 16, 2016

Great job! I really like the feature! It works flawless!

As Tatiana says, removing the 'highchart.com' is good idea. I still think is good to have the legend with the value of the period. The title is fine too.

I can think about couple of improvement but as i said before, to me is more a (great!) starting point and i don't think we are ready to call it for release unless LC users (i.e. David, Roc, Frank, Vandana, Luisa) can share more thoughts about it.
Improvements we could consider or user can expect: adding a step input to divide the slider to have more fine control on the period value, be able to change the min/max value, making the popup resizable, be able to add multiple fluxes and keep only one changing while the others stay on (different) fixed period, long etc.

…utton for starting phase folding dialog to be under 'phase folding' tab.
@cwang2016
Copy link
Contributor Author

some update and fixing:

  • fix a bug that wrongly compared the store status and the parameter updates of the phase folding dialog. That bug caused frequent and improper 2D charts rendering and slowed down the performance.
  • re-style the slider in order to make the slider stand out in less complicated look.
  • put the 'phase folding dialog' button under 'phase folding' tab, and the button is used to start the phase folding dialog.

@cwang2016 cwang2016 merged commit cde67e6 into dev Nov 17, 2016
@cwang2016 cwang2016 deleted the DM-8006-PhaseFold2DChart branch November 17, 2016 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants