Skip to content

DataLabelSettings and MarkerSettings image #12

Closed
@B0yma

Description

@B0yma

Im trying to set custom marker with visible labels:
`

        //primaryXAxis: CategoryAxis(),
        // Chart title
        //title: ChartTitle(text: 'Half yearly sales analysis'),
        // Enable legend
        legend: Legend(isVisible: false),
        // Enable tooltip
        tooltipBehavior: TooltipBehavior(enable: true),
        zoomPanBehavior: ZoomPanBehavior(
            enablePinching: true,
            zoomMode: ZoomMode.x,
            enablePanning: true),
        series: <ChartSeries<DskPoint, num>>[
          LineSeries<DskPoint, num>(
            dataSource: <DskPoint>[
              DskPoint(0, 35),
              DskPoint(1, 28),
              DskPoint(2, 34),
              DskPoint(3, 32),
              DskPoint(4, 40)
            ],
            xValueMapper: (DskPoint sales, _) => sales.x,
            yValueMapper: (DskPoint sales, _) => sales.y,
            dataLabelSettings: DataLabelSettings(isVisible: true),
            //markerSettings: MarkerSettings(isVisible: true, shape: DataMarkerType.rectangle),
             markerSettings: MarkerSettings(
                isVisible: true,
                shape: DataMarkerType.image,
                imageUrl: 'images/truck.png'),
            // Enable data label
          ),
          ScatterSeries<DskPoint, num>(
              dataSource: <DskPoint>[
                DskPoint(1, 10)
              ],
              xValueMapper: (DskPoint sales, _) => sales.x,
              yValueMapper: (DskPoint sales, _) => sales.y,
              //markerSettings: MarkerSettings(isVisible: true, shape: DataMarkerType.rectangle),
              markerSettings: MarkerSettings(
                  isVisible: true,
                  shape: DataMarkerType.image,
                  imageUrl: 'images/truck.png'),
              name: 'India'),
        ]),
  )),`

the values is dissapearing, but when we scroll chart labels comes to visible state,when stop scrolling they dissapear again..

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