Skip to content

Label display issue when two line chart is used along with bar chart (MixedCharts) #387

Description

@SumeshP
    New-HTMLTab -Name 'Trend - Service Requests' -IconRegular chart-bar {
        New-HTMLChart -Title 'Service Requests New vs Closed' -TitleAlignment center {
        New-ChartAxisX -Name $ColumnData.Week
        New-ChartLine -Name 'Tickets Open' -Value $ColumnData.Open -Color Blue      -Curve smooth -Width 2 -Dash 12 -Cap round 
        New-ChartLine -Name 'Tickets closed' -Value $ColumnData.Closed -Color Green -Curve smooth -Width 2 -Dash 12 -Cap round
        New-ChartBar -Name 'New Tickets' -Value $ColumnData.New -Color DarkSlateGray 
        New-ChartAxisY -Show -TitleText 'Tickets' -TitleColor AliceBlue
        New-ChartEvent -DataTableID 'IDTable' -ColumnID 3
        }
    }

When I use a second line chart as above, the data labels for the bar chart is displayed on the left side of the chart making them unusable.

If i choose alternate formatting options to correct the label to show in the middle of the bar, another problem occurs, as in
Example-MixedCharts.ps1
The bar is outlined with a dashed like creating a not so beautiful looking chart.

If i take away the second linechart, then the issue no longer occurs.

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