-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(declarative-chart): Support for Dashed line #33691
Conversation
@@ -281,6 +281,9 @@ export const transformPlotlyJsonToVSBCProps = ( | |||
const color = getColor(legend, colorMap, isDarkTheme); | |||
mapXToDataPoints[x].lineData!.push({ | |||
legend, | |||
lineOptions: ['dot', 'dash', 'longdash', 'dashdot', 'longdashdot'].includes(series.line?.dash as Dash) | |||
? { strokeDasharray: '5', strokeLinecap: 'butt', strokeWidth: '2', lineBorderWidth: '4' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets use the same dash type as provided by plotly.
dot = dot representation and so on
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray
@@ -29,7 +29,7 @@ import { DataVizPalette, getNextColor } from '../../utilities/colors'; | |||
import { GaugeChartVariant, IGaugeChartProps, IGaugeChartSegment } from '../GaugeChart/index'; | |||
import { IGroupedVerticalBarChartProps } from '../GroupedVerticalBarChart/index'; | |||
import { IVerticalBarChartProps } from '../VerticalBarChart/index'; | |||
import { Layout, PlotlySchema, PieData, PlotData, SankeyData } from './PlotlySchema'; | |||
import { Layout, PlotlySchema, PieData, PlotData, SankeyData, Dash } from './PlotlySchema'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you address this also. #33621 (review)
@@ -470,6 +473,9 @@ export const transformPlotlyJsonToScatterChartProps = ( | |||
|
|||
return { | |||
legend, | |||
lineOptions: ['dot', 'dash', 'longdash', 'dashdot', 'longdashdot'].includes(series.line?.dash as Dash) | |||
? { strokeDasharray: '5', strokeLinecap: 'butt', strokeWidth: '2', lineBorderWidth: '4' } | |||
: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also resolve the colormap pending comments
Closing this PR. Will create a new one. |
Previous Behavior
No support for dashed line.
New Behavior
Related Issue(s)