Skip to content

Color for pie chart elements #347

@giomf

Description

@giomf

Hello,

im trying to set the color for some pie charts Im currently working on. However, I dont see a way how to do it?

For reference this is my trace that I want to customize the color of.

let fire_trace = Pie::new(fire_detail_values)
    .labels(fire_detail_labels)
    .hole(0.4)
    .text_info("label+percent+value")
    .domain(
        Domain::new()
            .x(&[0.0, 0.5])
            .y(&[0.0, 0.5]),
    );
plot.add_trace(fire_trace);

I have tried it doing it over Marker but its not working either.

.marker(
    plotly::common::Marker::new().color_scale(plotly::common::ColorScale::Palette(
        plotly::common::ColorScalePalette::Jet,
    )),
)

What am I missing here? It seems possible to do it in python

Im using plotly = "0.13.5"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions