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

0.33.4 ggplot support for MakeAccessibleSVG + Add precommits #91

Merged
merged 21 commits into from
Feb 15, 2023

Conversation

1jamesthompson1
Copy link
Contributor

Here is all the work that has been done over the last month and so on ggplot graphics.

This introduces support for goemPoint and geomSmooth into the MakeAccessibleSVG.
It also rewrites the support for geomBar and geomLine.
As well as this it adds support for multiple layer ggplot graphs.

These geoms should be fully supported with some exceptions like geomPoints not being highlighted as they use custom shapes. This is highlighted in issue #90

I have also added in precommits to the repository. This is because it helps with keeping a constant style as well as preventing spelling errors and simple syntactical errors from getting committed. It only does quick checks but will hopefully help in the future.

This PR will close #82 and closes #83 as well as closes #80

I think that also for the time being that this resolves #81

Shortly this PR should be followed by a different one that has some documentation and vignettes that help a user learn about the support that BrailleR has for graphs. The next PR will also bump the version number to 0.99

It will now ignore both user folder and proj file.
This will add precommit hooks and action that will be run before you commit. It will style r code and check that it is lint free plus parsable. It will also do a few other things it can be edited with the .pre-commit-config.yaml file.
…to multi line work.

This means that there is one method that is called and then you tell the function which axis you would like to add.

Make lintr only a warning
…ope median as opposed to mean and sd of slopes.
…h the visual so there is nothing to see on the screen but the screenreader only perspective is complete.
Also extracting some of the duplicated code in the .AddXMLAddGGPlotLayer function and moved it around / make nested functions.

Removed Description file from spell check
…erison. THis breaks MakeAccessible SVG

I will work to make it functional again.
commit fb09ce28d2c9d89cb2f55ed4e3b6f33ab79c855d
Author: James <[email protected]>
Date:   Thu Jan 26 18:20:05 2023 +1300

    Fix error with showing in filled spaces.

    Also a few minor changes to remove some notes from the cmd check.

commit 5c344cb7217d93cec27901975e1eabe756bca9b2
Author: James <[email protected]>
Date:   Thu Jan 26 15:39:14 2023 +1300

    Add proper multiline support plus fix incorrect summary information and change it to tell you mean instead.

commit 66d30aaa1ce798ea428260b229119e4cc8b11fd9
Author: James <[email protected]>
Date:   Wed Jan 25 21:13:07 2023 +1300

    Add in basic geom_line for the SVG and XML.
    It follow works with the new verion and even has a basic multiple line implmentation.
    This mulitple line implementation is linear and would need to be made less linear if it is too work.
0.33.4 Add basic support for geom_point in MakeAccessibleSVG

commit da6e672cc61ce9e9f60343cd73507bfceb4c3798
Author: James <[email protected]>
Date:   Tue Jan 31 16:47:26 2023 +1300

    Improve speed of geom_point in svg. Besides a few changes the biggest one is that it will only show individual points when there are less than 100. Will otherwise just show the groups but you cant look at individual points.

commit 88143522089c34bd18528b5da6f051144deae409
Author: James <[email protected]>
Date:   Sat Jan 28 17:58:39 2023 +1300

    Add basic support for geom_point in the Make AccesibleSVG.

    -It should be noted that it still does not work with multiple layers

    -Is slow (not pracitcal for n > 1000)

    -Doesnt highlight the shapes points at all (This is becuase of the use tags)

    -Moving non circle points to arbutary places in the svg.
There is also a bit of a rewrite of RewriteSVG this has made it more
conise. The same treatment should be given to AddXMLInternal.

commit e74bfc34197c9d236620ef53eb548e330e0aa023
Author: James <[email protected]>
Date:   Thu Feb 2 16:46:13 2023 +1300

    Changed geom_smooth so that it works with the ci as well. You can no zoom in to either hte line or the ci at each segment.

    This has been an update of the RewriteSVG as well as the change of the xml to handle the extra information. The AddXML function are dying for a more concise rewrite.

commit bac4d1490895b7449a3cffdd0f6cc81ab6c94d7a
Author: James <[email protected]>
Date:   Thu Feb 2 11:48:30 2023 +1300

    update AddXML support for geom_smooth.

    Small change had to be made in the RewriteSVG. to handle the case of not having a CI.
    It now seems to be working for the base cases.

commit 254790ca10e05129bb4fb4fb11b375c76f21b91c
Author: James <[email protected]>
Date:   Wed Feb 1 18:47:40 2023 +1300

    Update AddXMLINternal to use new .SplitData function

    This function was made in the previous commit. It is much cleaner and can work better as the bridge between xml and svg. There isnt flexbility yet for it to have varying nsections but this can be added later.

commit 5889f3276ec56868255e67aba21619806ac1a020
Author: James <[email protected]>
Date:   Wed Feb 1 18:43:23 2023 +1300

    Add SVGThis support for Geom_smooth

    AddXML will be added later to allow the webpages to be built.

    There is also a rewrite of most of .RewriteSVG. This has cleaned it up and removed alot of the uneeded code. There is also optimization for geom_point in there.
geomLine, geomPoint, geomSmooth and geomBar should work for all sorts of
multilayer ggplots

These are a bunch of squashed commits.
There was some work to rewrite part of hoe the MakeAccessibleSVG works.

Hopefully some refactoring work gets done shrotly to help make future
dev work easier.

commit 1234ccbff1a7faa0379c940e968cdd4451a32bb6
Author: James <[email protected]>
Date:   Thu Feb 9 15:57:51 2023 +1300

    Fix up small errors with types in AddXMLInternal and the BrowseSVg that were causing them to not function correctly.

commit 9b43759b32d1fcdd8eaf92de6a9e0782d28b05d4
Author: James <[email protected]>
Date:   Thu Feb 9 15:02:37 2023 +1300

    Fix up geom_point support of NA values

commit d5ba4ac098dd040b912fb58bbe6748ec3c264d97
Author: James <[email protected]>
Date:   Wed Feb 8 21:21:37 2023 +1300

    Add support for geom_line to have disjoints lines.

commit 9d86eb4d0f71e39ee57ec56f28ebb0e5cff2a910
Author: James <[email protected]>
Date:   Fri Feb 3 19:53:43 2023 +1300

    Add support for goem_bar to be multi layered

    In this process found some errors with geom_line.

    This is with the dijointed lines. I will need to work on that now.

commit 7aba33150fab0736deaff32e8b25bc10661ddd15
Author: James <[email protected]>
Date:   Fri Feb 3 16:43:09 2023 +1300

    Update geom_smooth to work with multi layers

    This has had a few changes here and there however it was quite a smooth process. I have also added in a .CreateID function. This means that anytime you want create a ID reference for hte svg or the xml you use this function. However it isnt used much yet and I will need to do a fancy regex find and replace to fix this issue.

commit babfd989ccd1f36645f316169e52fd361e97dac8
Author: James <[email protected]>
Date:   Fri Feb 3 14:46:42 2023 +1300

    Update MakeAccessibleSVg to be more supportive of multiple layers. Add full support for geom_line and multiple layers.

    There was a significant rewrite of how the getGeomID works. This makes it take into account for layers in a way that should work for all sorts of multi layer plots.
These changes have been done to make the code more concise by mainly
using s3 generics. Taking away any of the the big ifelse trees.

There has also been some effort to reduce the amount of forloops and
instead using the *apply functions

commit dd79d058b3feeef818d458e1f5a96dcc600c5f99
Author: James <[email protected]>
Date:   Wed Feb 15 11:26:47 2023 +1300

    Rewrite the .RewriteSVG so that it uses genrics.

    I have also move the layer loop inside here rather then being the SVGThis function.

commit 2a4efd613e340d1cae615e8725144571bc577048
Author: James <[email protected]>
Date:   Sat Feb 11 13:12:45 2023 +1300

    Make the addXmlItem function a s3 method being more uniform

commit 7d3f76a7f1df1885cec29e789bade007b47e9606
Author: James <[email protected]>
Date:   Sat Feb 11 12:32:45 2023 +1300

    Refactoring .AddXMLAddGGplotLayer so that uses s3 genrics rather than a big ifelse tree.

    This means that hopefully it is easier to add support in the future.
Add pakcage referneces to function calls

Updathe titleGrob grid.grep location in the AddXML.ggplot function
This has been minor changes and mostly removing the experimental clauses at the start.
@ajrgodfrey ajrgodfrey merged commit 1d92011 into ajrgodfrey:master Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants