igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

When fewer than 3 datasets are provided to the igx-data-chart, it only displays the time.

Open Vighneshaa opened this issue 7 months ago • 2 comments

Description

The chart shows only the time on X-axis when the dates are consecutive and the dataset consist of only 2 points

igniteui-angular version: 13.1.8 browser: Chrome

Steps to reproduce

  1. We send the data in the following format. [ { "MSFT-USA : Analyst Conviction": 5.5, "MultiColumnChartDate": "07-15-2024", "orignalDateObjectKey": "2024-07-15T00:00:00.000Z" }, { "MSFT-USA : Analyst Conviction": 4.5, "MultiColumnChartDate": "07-16-2024", "orignalDateObjectKey": "2024-07-16T00:00:00.000Z" } ]
  2. The code that we use is given below:

<igx-data-chart domChange (onInit)="loadAxes(chart)" [crosshairVisibility]="'Visible'" #chart height="100%" width="100%" [legend]="legend" [defaultInteraction]="'DragPan'" [brushes]="brushColor" [windowRect]="windowRect" [isHorizontalZoomEnabled]="false" [isVerticalZoomEnabled]="false" [dataSource]="chartData">

            <igx-time-x-axis useClusteringMode="true" #xAxis overlap="0" gap="0.1" [dateTimeMemberPath]="DateKey" [label]="xAxisLabel" labellingMode="Compressed">
            </igx-time-x-axis>

            <igx-line-series [unknownValuePlotting]="unknownValuePlotting" #lineSeries
                *ngFor="let axis of lineSeries" [xAxis]="xAxis" [yAxis]="yAxisMap[axis.template]" hitTestMode="ColorEncoded"
                [tooltipTemplate]="tooltipTemplate" [markerType]="'None'" [valueMemberPath]="axis.title"
                [title]="axis.title" domChange (onInit)="seriesOnInit(lineSeries)">
            </igx-line-series>

            <igx-crosshair-layer brush="gray"></igx-crosshair-layer>

            <igx-final-value-layer></igx-final-value-layer>

Result

We see time as the x-axis. image

Expected result

We need x-axis label to atleast show date and time together when there are less data.

Vighneshaa avatar Jul 16 '24 12:07 Vighneshaa