Skip to content

PieChart method #19

@OneFreemanWill

Description

@OneFreemanWill

Hello Przemysław,

I have been struggling to use .AddPieChart and .AddChartPie to add a pie chart to Word doc output.

.AddPieChart seems to work OK in that my output doc lands up with a blank section that would be a pie, but whenever I try to use .AddChartPie I get an overload error.

Most basic example:

$PieChart = $DocumentTest.AddPieChart("Test Pie Chart", $true, 600, 300)

$PieChart.AddChartPie("Category1", 10)
$PieChart.AddChartPie("Category2", 20)
$PieChart.AddChartPie("Category3", 30)

Error:

Error: Cannot find an overload for "AddChartPie" and the argument count: "2".

I've tried making sure I'm using the expected types as defined below, but every variation seems to fail and results in the overload error.

[void] AddChartPie[T](
    [string] $name,
    [int[]] $values)

[void] AddChartPie[T](
    [string] $name,
    [List[T]] $values)

Can you offer any guidance or share an example?

Metadata

Metadata

Assignees

No one assigned

    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