-
Notifications
You must be signed in to change notification settings - Fork 535
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
Enhancement proposal for Waterfall chart. For #583 #778
base: master
Are you sure you want to change the base?
Conversation
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.
@sanand0 this is great work. My initial impression is that this will be a substantial (read "herculian") change. I'd like analysis to consider the full "new-style" chart scope, we don't want to design something that can't be extended to the other chart types, but that can wait until we at least understand one well.
It looks like Microsoft added a new add-chart method (.AddChart2()
) to accommodate these. Is that your understanding as well? Do they have an established name (instead of "new-style") by which they distinguish this new family of charts from the legacy ones?
Also let me know your general appetite for proceeding. There's going to be a lot of work here but even getting this far is a valuable contribution because otherwise I'm sure I would never have even explored it.
The columns are color coded so you can quickly tell positive from negative numbers. The initial and | ||
the final value columns often start on the horizontal axis, while the intermediate values are | ||
floating columns. Because of this "look", waterfall charts are also called bridge charts. | ||
|
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.
This Wikipedia link was something I ended up searching for quickly for orientation: https://en.wikipedia.org/wiki/Waterfall_chart
Probably worth working in early on in intro. All this suddenly started making a lot more sense after spending about 30-seconds there.
<p:clrMapOvr> | ||
<a:masterClrMapping/> | ||
</p:clrMapOvr> | ||
</p:sld> |
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.
This slide XML is too much. If it's the same as a regular chart let's leave it out, otherwise, focus on the differences. Actually let's leave it in for now, tightening this up isn't the biggest fish to fry at the moment :)
Alternate content generally indicates that older versions of PPT don't provide support and that there are actually two versions of this thing whatever it is. That would be a pretty massive change and definitely the part we'd want to focus on.
I expect I'll come back to this after reading further, but I think an intro paragraph and then just the high-level on the alternates and what they are, something like:
Waterfall charts are not supported by PowerPoint versions prior to {first-supporting-version, both Windows and Mac}. The waterfall chart appears inside an
<mc:AlternateContent>
block to accommodate non-supporting versions. The supporting alternative is ap:graphicFrame
element. The fallback alternative is ap:pic
element and represents a static image of the chart ...
Generating a static image rendering of the chart doesn't sound like something we're going to be able to do by the way, so we'll need to continue to think about how we accommodate that.
</p:clrMapOvr> | ||
</p:sld> | ||
|
||
|
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.
Let's have a look at the slide relationships too, in particular rId2
. I'm not seeing where chartEx1.xml
is coming from and that's an unfamiliar root name. Maybe from an example slide that has both a traditional chart and a waterfall chart so we can contrast the two.
<Relationship Id="rId3" Type="http://schemas.microsoft.com/office/2011/relationships/chartColorStyle" Target="colors1.xml"/> | ||
<Relationship Id="rId2" Type="http://schemas.microsoft.com/office/2011/relationships/chartStyle" Target="style1.xml"/> | ||
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet.xlsx"/> | ||
</Relationships> |
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.
maybe also show the _rels/chart1.xml
too so we can see how the relationships are affected. I don't remember those including color and style part relationships.
</cx:plotArea> | ||
<cx:legend pos="t" align="ctr" overlay="0" /> | ||
</cx:chart> | ||
</cx:chartSpace> |
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.
I think we need a contrast-study on this as well. What specifically is different for a waterfall chart? Minimally those should be catalogued. If a side-by-side is helpful we should have that too. I'm starting to like the idea of the slide being a side-by-side 2-chart slide with the left one being traditional (add that one first) and the second being waterfall. Then the comparison can follow throughout.
This looks different in shape to me, but that could just be a formatting difference.
<a:schemeClr val="tx1"/> | ||
</cs:fontRef> | ||
</cs:wall> | ||
</cs:chartStyle> |
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.
This is too long, let's find a way to summarize, like show a couple styles and then abbreviate the rest.
ActiveChart.Axes(xlCategory).Select | ||
ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesMajor) | ||
ActiveChart.Axes(xlValue).Select | ||
Selection.MajorTickMark = xlOutside |
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.
Let's see a contrast here too. The old one should look pretty much like the existing python-pptx
protocol.
Thanks for the comments @scanny. The newer charts are steadily gaining traction, and I'd be happy to work on this. I'll spend the next few days comparing the new charts with the old and revert based on your comments. |
@scanny -- I've added a few details, but I thought it might be best to share the full extract of a PPT with a bar chart and a waterfall TEMPORARILY so that you might get a sense of what's happening & is different between these charts. I'll continue with the analysis, but just wanted to check with you if it's OK to commit a few selected XML files as part of the PR? |
@scanny I've put together an analysis document for the waterfall chart, as you'd suggested for #583
I based this on the Bubble Chart proposal. This only covers the waterfall chart as an example, but this could be easily extended to cover:
I'd be happy to support this in any way. Please let me know if you'd like any further analysis or exploration.