@@ -46,6 +46,18 @@ const CALCULATED_VALUE_OPERATORS = [
4646 { value : 'formula' , label : 'Formula' } ,
4747] ;
4848
49+ const LINE_STYLES = [
50+ { value : 'solid' , label : 'Solid' } ,
51+ { value : 'dashed' , label : 'Dashed' } ,
52+ { value : 'dotted' , label : 'Dotted' } ,
53+ ] ;
54+
55+ const BAR_STYLES = [
56+ { value : 'solid' , label : 'Solid' } ,
57+ { value : 'outlined' , label : 'Outlined' } ,
58+ { value : 'striped' , label : 'Striped' } ,
59+ ] ;
60+
4961export default class GraphDialog extends React . Component {
5062 constructor ( props ) {
5163 super ( props ) ;
@@ -77,6 +89,7 @@ export default class GraphDialog extends React.Component {
7789 title : initialConfig . title || '' ,
7890 yAxisTitlePrimary : initialConfig . yAxisTitlePrimary || '' ,
7991 yAxisTitleSecondary : initialConfig . yAxisTitleSecondary || '' ,
92+ secondaryYAxisType : initialConfig . secondaryYAxisType || null ,
8093 showLegend : initialConfig . showLegend !== undefined ? initialConfig . showLegend : true ,
8194 showGrid : initialConfig . showGrid !== undefined ? initialConfig . showGrid : true ,
8295 showAxisLabels : initialConfig . showAxisLabels !== undefined ? initialConfig . showAxisLabels : true ,
@@ -402,6 +415,10 @@ export default class GraphDialog extends React.Component {
402415 const hasCircular = this . hasCircularReference ( index ) ;
403416 // Check for formula errors
404417 const formulaError = this . getFormulaError ( index ) ;
418+ // Compute effective chart type for this calculated value
419+ const effectiveType = calc . useSecondaryYAxis && this . state . secondaryYAxisType
420+ ? this . state . secondaryYAxisType
421+ : this . state . chartType ;
405422
406423 return (
407424 < div key = { index } style = { { paddingTop : '10px' , paddingLeft : '10px' , paddingRight : '10px' , paddingBottom : isExpanded ? '0' : '10px' , borderTop : '1px solid #e3e3e3' , borderLeft : '1px solid #e3e3e3' , borderRight : '1px solid #e3e3e3' , borderBottom : index === this . state . calculatedValues . length - 1 ? '1px solid #e3e3e3' : 'none' } } >
@@ -547,6 +564,44 @@ export default class GraphDialog extends React.Component {
547564 </ div >
548565 </ div >
549566 ) }
567+ { effectiveType === 'line' && (
568+ < div style = { { display : 'grid' , gridTemplateColumns : '1fr 1fr' , borderTop : '1px solid #e3e3e3' } } >
569+ < div style = { { display : 'flex' , alignItems : 'center' } } >
570+ < Label text = "Line Style" />
571+ </ div >
572+ < div >
573+ < Dropdown
574+ value = { calc . lineStyle || 'solid' }
575+ onChange = { lineStyle => this . updateCalculatedValue ( index , 'lineStyle' , lineStyle ) }
576+ >
577+ { LINE_STYLES . map ( style => (
578+ < Option key = { style . value } value = { style . value } >
579+ { style . label }
580+ </ Option >
581+ ) ) }
582+ </ Dropdown >
583+ </ div >
584+ </ div >
585+ ) }
586+ { effectiveType === 'bar' && (
587+ < div style = { { display : 'grid' , gridTemplateColumns : '1fr 1fr' , borderTop : '1px solid #e3e3e3' } } >
588+ < div style = { { display : 'flex' , alignItems : 'center' } } >
589+ < Label text = "Bar Style" />
590+ </ div >
591+ < div >
592+ < Dropdown
593+ value = { calc . barStyle || 'solid' }
594+ onChange = { barStyle => this . updateCalculatedValue ( index , 'barStyle' , barStyle ) }
595+ >
596+ { BAR_STYLES . map ( style => (
597+ < Option key = { style . value } value = { style . value } >
598+ { style . label }
599+ </ Option >
600+ ) ) }
601+ </ Dropdown >
602+ </ div >
603+ </ div >
604+ ) }
550605 { hasCircular && (
551606 < div style = { { borderTop : '1px solid #e3e3e3' , padding : '12px' , background : '#fff3cd' , color : '#856404' } } >
552607 < strong > ⚠ Circular Reference Detected</ strong >
@@ -686,6 +741,25 @@ export default class GraphDialog extends React.Component {
686741 } />
687742 ) }
688743
744+ { ( this . state . chartType === 'bar' || this . state . chartType === 'line' ) && (
745+ < Field label = {
746+ < Label
747+ text = "Secondary Y-Axis Chart Type"
748+ description = "Chart type for secondary axis series"
749+ />
750+ } input = {
751+ < Dropdown
752+ value = { this . state . secondaryYAxisType || '' }
753+ onChange = { secondaryYAxisType => this . setState ( { secondaryYAxisType : secondaryYAxisType || null } ) }
754+ placeHolder = "Same as chart type"
755+ >
756+ < Option value = "" > Same as chart type</ Option >
757+ < Option value = "bar" > Bar</ Option >
758+ < Option value = "line" > Line</ Option >
759+ </ Dropdown >
760+ } />
761+ ) }
762+
689763 < Field label = {
690764 < Label
691765 text = "Max Data Points"
0 commit comments