ChartView icon indicating copy to clipboard operation
ChartView copied to clipboard

Add new chart size

Open SAPIENTechnologies opened this issue 5 years ago • 7 comments

It would be very nice to have a chart size of 360x240 (XLarge) or give us the ability to define a custom size for our frames

SAPIENTechnologies avatar May 13 '20 17:05 SAPIENTechnologies

@SAPIENTechnologies Just looking through the framework right now and in LineCard.swift on line 33, the frame size appears to be hard-coded to 180 x 120. I'm new to SwiftUI, so I'm not 100% sure how to do something adjustable, but I'll fiddle with it and figure how to implement resizing on it. I'm gonna fork the repo and tinker w/ it.

AdrianBinDC avatar May 19 '20 02:05 AdrianBinDC

Hello,

is this the result you are waiting for? Screen Shot 2020-05-28 at 4 01 50 PM

Nicolas

satan87 avatar May 28 '20 20:05 satan87

That looks great!

SAPIENTechnologies avatar May 28 '20 21:05 SAPIENTechnologies

PR #108 Works for multiline also, BarChart and PieChart.

satan87 avatar May 28 '20 22:05 satan87

Perfect. Is that a 2.0 feature?

SAPIENTechnologies avatar Jun 03 '20 17:06 SAPIENTechnologies

It would be awesome to have a .fill size so the chart could just fill the space it's given.

thecoolwinter avatar Jun 06 '20 16:06 thecoolwinter

Nevermind I didn't realize the form struct was just a CGSize so you can make your own CGSize and pass that to form.

thecoolwinter avatar Jun 06 '20 16:06 thecoolwinter