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 option to Show Leader Lines in charts #642

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/core-interfaces.ts
Expand Up @@ -165,6 +165,7 @@ export interface IChartOpts extends PositionOptions, OptsChartGridLine {
holeSize?: number
showTitle?: boolean
showValue?: boolean
showLeaderLines?: boolean
showPercent?: boolean
catLabelFormatCode?: string
dataBorder?: IBorderOptions
Expand Down
6 changes: 3 additions & 3 deletions src/gen-charts.ts
Expand Up @@ -752,7 +752,7 @@ function makeChartType(chartType: CHART_TYPE_NAMES, data: OptsChartData[], opts:
strXml += ' <c:showSerName val="0"/>'
strXml += ' <c:showPercent val="0"/>'
strXml += ' <c:showBubbleSize val="0"/>'
strXml += ' <c:showLeaderLines val="0"/>'
strXml += ' <c:showLeaderLines val="' + (opts.showLeaderLines ? '1' : '0') + '"/>'
strXml += ' </c:dLbls>'
}

Expand Down Expand Up @@ -889,7 +889,7 @@ function makeChartType(chartType: CHART_TYPE_NAMES, data: OptsChartData[], opts:
strXml += ' <c:showSerName val="0"/>'
strXml += ' <c:showPercent val="0"/>'
strXml += ' <c:showBubbleSize val="0"/>'
strXml += ' <c:showLeaderLines val="0"/>'
strXml += ' <c:showLeaderLines val="' + (opts.showLeaderLines ? '1' : '0') + '"/>'
strXml += ' </c:dLbls>'
}

Expand Down Expand Up @@ -1483,7 +1483,7 @@ function makeChartType(chartType: CHART_TYPE_NAMES, data: OptsChartData[], opts:
strXml += ' <c:showSerName val="0"/>'
strXml += ' <c:showPercent val="1"/>'
strXml += ' <c:showBubbleSize val="0"/>'
strXml += ' <c:showLeaderLines val="0"/>'
strXml += ' <c:showLeaderLines val="' + (opts.showLeaderLines ? '1' : '0') + '"/>'
strXml += '</c:dLbls>'

// 2: "Categories"
Expand Down
1 change: 1 addition & 0 deletions src/gen-objects.ts
Expand Up @@ -231,6 +231,7 @@ export function addChartDefinition(target: ISlide, type: CHART_TYPE_NAMES | ICha
options.showPercent = options.showPercent === true || options.showPercent === false ? options.showPercent : true
options.showTitle = options.showTitle === true || options.showTitle === false ? options.showTitle : false
options.showValue = options.showValue === true || options.showValue === false ? options.showValue : false
options.showLeaderLines = options.showLeaderLines === true || options.showLeaderLines === false ? options.showLeaderLines : false
options.catAxisLineShow = typeof options.catAxisLineShow !== 'undefined' ? options.catAxisLineShow : true
options.valAxisLineShow = typeof options.valAxisLineShow !== 'undefined' ? options.valAxisLineShow : true
options.serAxisLineShow = typeof options.serAxisLineShow !== 'undefined' ? options.serAxisLineShow : true
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Expand Up @@ -301,6 +301,7 @@ declare namespace PptxGenJS {
holeSize?: number
showTitle?: boolean
showValue?: boolean
showLeaderLines?: boolean
showPercent?: boolean
catLabelFormatCode?: string
dataBorder?: IBorderOptions
Expand Down