Skip to content

Charts won't Extend to the Edge #1290

Open
@razorsyntax

Description

@razorsyntax

Tell us about the problem

The chart lines don't extend to the end of the StackLayout. Both Android and iOS have this problem. Negative margins are ineffective and inconsistent as the chart builds.

What it currently looks like:
Screen Shot 2019-11-03 at 2 33 02 PM

What I want it to look like. (made in Photoshop)
Screen Shot 2019-11-03 ddat 2 33 02 PM copy

With photos and breakdown of detailed explanation.
Stackoverflow link to answer this if answer exists

Which platform(s) does your issue occur on?

Both Android & iOS

Please provide the following version numbers that your issue occurs with:

  • nativescript-u-chart version 5.0.0
  • CLI version 6.1.2
    -tns-core-modules version 6.1.1
  • Runtime:
    Android 6.1.1
    iOS 6.1.2

Please tell us how to recreate the issue in as much detail as possible.

Code snippet:

 <StackLayout height="100%" width="100%">
        <RadCartesianChart 
                height="100%"
                width="100%"
                class="default-background">
            <CategoricalAxis
                lineColor="#f5f5f5" 
                hidden="true" 
                lineHidden="true" 
                lineThickness="1"
                labelLayoutMode="Inner"
                tkCartesianHorizontalAxis>
            </CategoricalAxis>
            <LinearAxis
                lineColor="#f5f5f5"
                hidden="true" 
                lineHidden="true" 
                lineThickness="1"
                labelLayoutMode="Inner" 
                [maximum]="max"
                [minimum]="min"
                tkCartesianVerticalAxis>
            </LinearAxis>
            <AreaSeries
                tkCartesianSeries 
                seriesName="Area" 
                showLabels="false" 
                categoryProperty="Date" 
                [items]="areaSource$ | async"
                valueProperty="Amount" 
                selectionMode="None">
            </AreaSeries>
            <RadCartesianChartGrid 
                tkCartesianGrid 
                horizontalLinesVisible="false" 
                verticalLinesVisible="false" 
                verticalStripLinesVisible="false"
                horizontalStripLinesVisible="false" 
                horizontalStrokeColor="#181818">
            </RadCartesianChartGrid>
            <Palette tkCartesianPalette seriesName="Area">
                <PaletteEntry
                    tkCartesianPaletteEntry
                    opacity="1" 
                    [fillColor]="fillColor"
                    [strokeColor]="lineColor"
                    android:strokeWidth="4"
                    ios:strokeWidth="2">
                </PaletteEntry>
                <PaletteEntry 
                    tkCartesianPaletteEntry 
                    [fillColor]="fillColor" 
                    strokeColor="#181818" 
                    strokeWidth="0">
                </PaletteEntry>
            </Palette>
        </RadCartesianChart>
    </StackLayout>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions