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

Opened 140 html compliant colors #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ Change Log
* left_on, right_on, on functionality for create_edge method similar to pandas merge
* added url to graphviz renderer
* added bg_color attribute to Table object

0.1.4 (27/03/2022)
-------------------
* added full html color list to bg_color attribute options
* refactored above for module import
* added graphviz renderer for to_file, based on suffix
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ erd.write_to_file('output.txt')
```
![example image](example_erd.png "Title")

* Available color names (_pink_ and _skyblue_ in above example) follow [standard 140 HTML named colors](https://www.w3schools.com/colors/colors_names.asp).

### Credits
Largely inspired by this fab [repo](https://github.com/ehne/ERDot)!
* dot documentation can be found [here](https://www.graphviz.org/pdf/dotguide.pdf)
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
df2.columns = ['PERSON', 'CREDIT_CARD', 'DOB', 'PERSON_AGE', 'POSTAL_CODE']

erd = ERD()
t1 = erd.add_table(df1, 'PERSON', bg_color='pink')
t2 = erd.add_table(df2, 'CREDIT_CARD', bg_color='skyblue')
t1 = erd.add_table(df1, 'PERSON', bg_color='bisque')
t2 = erd.add_table(df2, 'CREDIT_CARD', bg_color='linen')
erd.create_rel('PERSON', 'CREDIT_CARD', on='PERSON', right_cardinality='*')
erd.create_rel('PERSON', 'CREDIT_CARD', left_on='AGE', right_on='PERSON_AGE', left_cardinality='+', right_cardinality='+')

erd.write_to_file('output.txt')
erd.write_to_file('example.dot')
erd.write_to_file('example.png')
49 changes: 0 additions & 49 deletions output.txt

This file was deleted.

1 change: 1 addition & 0 deletions pandaserd/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.5-2-g5758529
Loading