File tree 4 files changed +43
-1
lines changed
4 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @veupathdb/components" ,
3
- "version" : " 0.11.1 " ,
3
+ "version" : " 0.11.2 " ,
4
4
"license" : " Apache-2.0" ,
5
5
"description" : " React Components for VEuPathDB Websites" ,
6
6
"repository" : {
Original file line number Diff line number Diff line change @@ -11,8 +11,18 @@ import React, {
11
11
import { memoize } from 'lodash' ;
12
12
13
13
import { FacetedData , FacetedPlotRef , PlotRef } from '../types/plots' ;
14
+ import FacetedBarplot from './facetedPlots/FacetedBarplot' ;
15
+ import Barplot from './Barplot' ;
14
16
import { PlotProps } from './PlotlyPlot' ;
15
17
18
+ const mapStringToPlotComponent = ( str : string ) =>
19
+ ( {
20
+ Barplot : {
21
+ faceted : FacetedBarplot ,
22
+ unfaceted : Barplot ,
23
+ } ,
24
+ } [ str ] ) ;
25
+
16
26
type ComponentWithPlotRef < P > = ComponentType <
17
27
PropsWithoutRef < P > & RefAttributes < PlotRef >
18
28
> ;
Original file line number Diff line number Diff line change
1
+ import Barplot , { BarplotProps } from '../Barplot' ;
2
+
3
+ const facetedPlotContainerStyles = {
4
+ height : 300 ,
5
+ width : 375 ,
6
+ marginLeft : '0.75rem' ,
7
+ border : '1px solid #dedede' ,
8
+ boxShadow : '1px 1px 4px #00000066' ,
9
+ } ;
10
+
11
+ const facetedPlotSpacingOptions = {
12
+ marginRight : 10 ,
13
+ marginLeft : 10 ,
14
+ marginBotton : 10 ,
15
+ marginTop : 50 ,
16
+ } ;
17
+
18
+ const FacetedBarplot = ( {
19
+ containerStyles = facetedPlotContainerStyles ,
20
+ spacingOptions = facetedPlotSpacingOptions ,
21
+ ...restProps
22
+ } : BarplotProps ) => (
23
+ < Barplot
24
+ containerStyles = { containerStyles }
25
+ spacingOptions = { spacingOptions }
26
+ { ...restProps }
27
+ />
28
+ ) ;
29
+
30
+ export default FacetedBarplot ;
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ export type XYPlotDataSeries = {
33
33
fill ?: 'tozerox' | 'tozeroy' | 'toself' ;
34
34
/** filling plots: color */
35
35
fillcolor ?: string ;
36
+ /** R-square value for Best fit option */
37
+ r2 ?: number ;
36
38
} ;
37
39
38
40
export type XYPlotData = {
You can’t perform that action at this time.
0 commit comments