KarthikRIyer / swiftplot

Swift library for Data Visualization :bar_chart:
Apache License 2.0
401 stars 39 forks source link

Replace Point type with Pair<T,U> #31

Closed KarthikRIyer closed 5 years ago

KarthikRIyer commented 5 years ago

27

I have changed Point to Pair<T,U>. This removes the unwanted xString and yString variables. I've added some specific comments with the code below.

If this seems ok, could you please review #30 ? I'd liketo get that merged before this one so that I can convert the currently implemented Histogram to Pair<>. Also that PR has some fixes for segmentation fault errors.

KarthikRIyer commented 5 years ago

Sorry for resolving the above review> I clicked it by mistake.

KarthikRIyer commented 5 years ago

I've made the changes apart from some queries which I've specified above. The thing left to be done is include Histogram. I'll do that by tomorrow.

KarthikRIyer commented 5 years ago

@BradLarson I thought it would be best to converts all the plots to generics. So I did that. Also I have kept the HistogramSeries as a separate type because I would have had to add a lot of unnecessary stuff to the normal series to get it working and it would have got messy. But I moved all the calculation part to the Histogram class. Now the HistogramSeries type just stores the required variables and does no calculation.

KarthikRIyer commented 5 years ago

@BradLarson I've created files for the random values. Merging this now.