-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Description
Description
Hi everyone!
I generated a Pie Chart, but I can't change the PaperBGColor of it anyhow.
Repro steps
-
Using
mypiechart.Show(), it shows it in HTML as transparent..
but if I save it down withmypiechart.SavePNG(path)then background becomes white. -
I tried to Initialise a new Layout and add that to it, but same result.
//I generate a Pie Chart in F#
var pieChart = GG.PieStyled(values, labels);
var legend = Legend.init();
var layout = new Layout();
layout.SetValue("legend", legend);
layout.SetValue("title", "PiePie Chart");
layout.SetValue("PaperBGColor", Plotly.NET.Color.fromARGB(0, 100, 255, 50));
layout.SetValue("PlotBGColor", Plotly.NET.Color.fromARGB(0, 100, 255, 50));
pieChart.WithLayout(layout);
pieChart.SavePNG(name);F# part of the code
namespace GraphGenerator
open Plotly.NET
open FSharp.Core
open Plotly.NET.ImageExport
module GG =
[<CompiledName("PieStyled")>]
let pieStyled (values, labels) =
Chart.Pie(
values = values,
Labels = labels,
SectionColors = [ Color.fromKeyword Aqua; Color.fromKeyword Salmon; Color.fromKeyword Tan ],
SectionOutlineColor = Color.fromKeyword Black,
SectionOutlineWidth = 2.,
MultiText = labels,
MultiTextPosition =
[ StyleParam.TextPosition.Outside
StyleParam.TextPosition.Outside
StyleParam.TextPosition.Outside ],
Rotation = 45.,
MultiPull = [ 0.; 0.3; 0. ]
)Expected behavior
When I look at the saved down png image, I see a transparent Pie Chart.
Actual behavior
I see a Pie Chart with white background.
Related information
- WIndows 11
Reactions are currently unavailable