Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Runtime type errors from Range.integers in pie_layout.dart #230

@gian

Description

@gian

Hi there,

I've hit a type error when running the examples (and my own code...):

Exception: type 'List<num>' is not a subtype of type 'List<int>' of 'index' where
  List is from dart:core
  num is from dart:core
  List is from dart:core
  int is from dart:core
PieLayout.layout | @ | package:charted/layout/src/pie_layout.dart:53
-- | -- | --
PieChartRenderer.layout | @ | package:charted/charts/layout_renderers/pie_chart_renderer.dart:108
DefaultLayoutAreaImpl.draw | @ | package:charted/charts/src/layout_area_impl.dart:250
drawSimplePieChart | @ | demo_pie_charts.dart:25
main | @ | demo_pie_charts.dart:50

The offending line is:

List<int> index = new Range.integers(values.length).toList();

Which appears to relate to the inferred bound on Range.integers being List<num>.

This isn't insurmountable because it only occurs in Dartium, and this works as expected when using dartdevc in regular ol' Chrome instead --- it's just slightly frustrating given my workflow.

I encountered this issue using charted 0.5.0 and dart 1.24.3.

Thanks for the release of charted!

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