The decision to use a third party library is not to be done lightly. The decision to write something on your own, on the other hand, depends on the amount of work going to implementing it.
As you correctly noted, third party libraries often depend on other libraries. This may mean library A depends on B v1.0 + C v1.2, and library D depends on C v1.1, and you may not necessarily be able to have C v1.1 and C v1.2 linked at the same time, effectively meaning A and D are incompatible.
If using a third-party library, keep in mind wrappers: Using third-party libraries - always use a wrapper?
Consider also these:
- Security problems: third-party libraries may have well-known security problems.
- Time to learn: the hardest thing sometimes may be learning to use the interface, not implementing it, meaning you may as well write all on your own
- Replaceability: you should have a strategy for replacing a third-party library with another third-party library or writing the functionality on your own
- License issues: If you write on your own, you have the copyright and no need to worry about licenses and their conditions.
- Startup time: Loading a simple homemade library is faster than loading a big honking gigantic external library
- Memory footprint: The same as for startup time, big external libraries consume more memory.
- Bug risk: The larger the external library is, the more likely is it has bugs.
- Version stability: Some third party libraries do not have a stable interface, meaning updating the library breaks everything.
I would based on these suggest you to carefully consider whether you want to use a third-party library or not. For a project of mine, a scientific application, I decided to only use a line chart library and implement everything else myself. I actually wrote my own line chart library as well, but didn't bother to fine-tune it to result in as pretty graphs as possible, which is why I in the end used an existing library.