Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added touchablility to scroll graph view -- Started with jz709u's code #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mithunmathew1990
Copy link

@mithunmathew1990 mithunmathew1990 commented May 1, 2017

Hi,
I started with jz709u's code given in #69
-- Fixed crashes
-- Integrated code in examples to make it easy
-- Added code to show custom bar graph for selected bar

Changes

  • All graph types are now selectable
    [implement PointSelectedProtocol and graphView.pointSelectedDelegate = viewController]
  • Bar graph is customisable on touch, current it goes hollow on touch
    [just do a graphView.shouldCustomizeSelection = true]
  • Fixed bar direction rightToLeft
    • when number of data points was less than what fits the screen the graph was right aligned instead of starting at the left most end [if that was the intended purpose for .rightToLeft then please don't merge setup() function of ScrollableGraphView.swift]

@philackm
Copy link
Owner

Hi, thanks for working on this! I really appreciate it. It looks good and I definitely want to merge it in. I'll review it and merge it in once I've finished my exams in a few weeks, unfortunately I have no time until then.

var graphSizeExceedsWindow = false
if (self.viewportWidth < totalGraphWidth) {
graphSizeExceedsWindow = true
}

Choose a reason for hiding this comment

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

let graphSizeExceedsWindow = self.viewportWidth < totalGraphWidth is enough.

Copy link
Author

Choose a reason for hiding this comment

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

Btw that part of the code (function setup ()) charges how the graph works when direction is set to left to right and number of items on the graph is less than screen size. Previously it was like a right aligned graph with this code it would be a graph that looks like leftToRight until screen is filled and then it work Would start looking like right aligned graph.

Please don't merge this function of it charges functionality of rightToLeft.

@philackm
Copy link
Owner

philackm commented Jul 9, 2017

I've just refactored the code quite a lot and added in multiple plots & a few other features. We will have to go through this code and adapt it to the new version. Thanks a lot for the work @mithunmathew1990, @NunoAlexandre

@doddyth
Copy link

doddyth commented Jan 23, 2019

Hi @philackm, any update on this feature?

@Rakibrz
Copy link

Rakibrz commented May 9, 2019

Why this update (plot touchability) has been removed in latest pod?

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.

5 participants