Dyalog / ride

Cross-platform IDE for Dyalog APL
https://dyalog.github.io/ride
MIT License
202 stars 31 forks source link

svg -webkit-fill-available work around now makes the chart too small in RIDE 4.4. #860

Closed dyavc closed 1 year ago

dyavc commented 2 years ago

Describe the issue you are having

The webkit workaround that works in RIDE 4.3, makes the chart too small in RIDE 4.4.

Did you connect to an already running interpreter or start the interpreter from RIDE?

Start the interpreter from RIDE

How do you reproduce the issue?

'InitCauseway' 'View'⎕CY'sharpplot' InitCauseway ⍬ ⍝ initialise current namespace data←33 18 12 10 exp←0 0 0 20 key←'UK' 'France' 'Italy' 'Ireland' sp←⎕NEW Causeway.SharpPlot sp.PaperSize←1600 800 ⍝ default size sp.Heading←'Sample pie chart' ⍝ Property sp.PieChartStyle←Causeway.PieChartStyles.ValueTags ⍝ Flag property with single flag sp.KeyStyle←Causeway.KeyStyles.(CenterAlign+BottomAlign) ⍝ Flag property with multiple flags sp.SetKeyText(⊂key) ⍝ Need to enclose the key vector because it is a single argument, rather than a list of arguments sp.SetColors⊂System.Drawing.Color.(Navy Maroon Teal Green) ⍝ Need to enclose the vector because it is a single argument sp.SetMargins(42 48 36 18) ⍝ No need to enclose because the 4-item vector maps to 4 arguments sp.DrawPieChart(data exp) ⍝ Two arguments sp.SaveSvg(⊂'samplepie.svg') ⍝ SharpPlot/APL doesn't support raster graphics : SVG is the recommended way to export charts.

View sp ⍝ View function has the webkit lines which are ⍝ hack around mantis issue #16420 / github ride issue #553 svg,⍨←'' svg,←''

Paste the contents of Help → About (Shift+F1)

Ubuntu 22.04 with RIDE 4.4.3687 and Dyalog 18.2
e9gille commented 1 year ago

I don't think this is a RIDE issue, but with the recent change (#1128) I believe the workaround in View is redundant. I notice however that rendering svg now requires an xml declaration specifying the encoding, so will add that.