Skip to content

Feature/290-max-value-perf-fixes#291

Merged
eman1986 merged 18 commits into
microcharts-dotnet:mainfrom
brett-estabrook:feature/290-max-value-perf-fixes
Nov 28, 2021
Merged

Feature/290-max-value-perf-fixes#291
eman1986 merged 18 commits into
microcharts-dotnet:mainfrom
brett-estabrook:feature/290-max-value-perf-fixes

Conversation

@brett-estabrook
Copy link
Copy Markdown
Contributor

@brett-estabrook brett-estabrook commented Oct 13, 2021

I have modified the AxisBasedCharts to rework the main render loop. The main changes are to move the Min,Max, and Range values to the top and store them in local variables. This caches the values of these functions so they are not recalculated each bar/line/point render. I made a few other changes that were related to my changes

Notable Changes:

Charts tested:

  • Bar
  • Point
  • Line
  • Donut
  • Radar

Platform tested :

  • Android
  • iOS
  • MacOS
  • Windows

Fix:

Cache maxvalue, minvalue, and valuerange to prevent constant recalculations during drawing loops
Removing excess logging and adding better data generation
Better test data.
Fixing issue with user defined min/max values
Adding an event for chart rendering complete
Proper set comparison
Don't double change animation progress when updating series
The lines and bar charts were drawing too close to left labels
Adding some comments
Making the values match the labels
Fixing issue with null values
Adding some comments about min/max values
@eman1986 eman1986 self-requested a review October 14, 2021 01:16
@eman1986 eman1986 self-assigned this Oct 14, 2021
@eman1986 eman1986 linked an issue Oct 14, 2021 that may be closed by this pull request
@brett-estabrook
Copy link
Copy Markdown
Contributor Author

Once the pull request for my missing null value changes is finalized I'll mark this as ready for review.

@Seuleuzeuh
Copy link
Copy Markdown
Contributor

Great work !
I'll try to test it on Android an Windows this week !

@brett-estabrook brett-estabrook marked this pull request as ready for review October 20, 2021 23:33
@brett-estabrook
Copy link
Copy Markdown
Contributor Author

I touched a lot of the drawing code, I've reviewed a number of charts. However, I would recommend another pair of eyes making sure the labels, points, and lines all line up.

Copy link
Copy Markdown
Contributor

@Seuleuzeuh Seuleuzeuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realy great work, thanks for the couple of PR you made.
The null handling it's preaty great !

Only the multiple label drawing must be fixed before merged.
Thanks again @brett-estabrook

Comment thread Sources/Microcharts/Charts/AxisBasedChart.cs Outdated
Comment thread Sources/Microcharts/Charts/AxisBasedChart.cs
Comment thread Sources/Microcharts/Charts/Chart.cs
Applying correct equality check
Moving label drawing into its own loop
Fix label count in chart dynamic data
@brett-estabrook brett-estabrook mentioned this pull request Nov 1, 2021
9 tasks
Copy link
Copy Markdown
Contributor

@Seuleuzeuh Seuleuzeuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eman1986 it's ready to merge !

@eman1986
Copy link
Copy Markdown
Member

sorry didn't see that this was good to go, merging it in.

@eman1986 eman1986 merged commit fe71696 into microcharts-dotnet:main Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Performance hit with MaxValue and MinValue of Axis based charts

3 participants