BasicPrimitives / react

Basic Primitives Diagrams for React. Data visualization components library that implements organizational chart and multi-parent dependency diagrams.
https://basicprimitives.github.io/react/
Other
22 stars 5 forks source link

changing the design of nodes #33

Closed devhe4d closed 3 years ago

devhe4d commented 3 years ago

Hi, hope you are doing well

I wonder how could I change the design from its default to something like in the picture? I tried editing some elements on the template folder in source code, but the problem is when I deploy the chart on heroku, it rebuild it with default settings.

Capture

if there is better way to fully edit the design ( colors, fonts, etc.. ) I would really thankful to show it how. for example: how can I change the title blue background? I read the API refrence for OrgChartConfig and found a "itemtitleColor" , but when I pass it to config file with for example "ff0000" color, it doesn't get applied

BasicPrimitives commented 3 years ago

Hi, thanks.

You need to take a look at the following sample: https://github.com/BasicPrimitives/react/blob/master/src/Samples/ItemTemplate.js

We recommend this way of item templates customization. Just don't forget to replace

import { OrgDiagram } from '../Diagrams';

with

import { OrgDiagram } from 'basicprimitivesreact';

You modified the built-in template used when a developer does not provide any templates at all.

BasicPrimitives commented 3 years ago

Look at our react-demo repository. It is an end-to-end ReactJS application having the Redux store for state management. You may find it more helpful for ad-hock application development.

devhe4d commented 3 years ago

Hi again, I added the "template" config option to the config object. everything works fine, but the buttons doesn't get rendered. I checked the demo on this link and here the buttons doesn't get rendered when we click on a user.

BasicPrimitives commented 3 years ago

See ReactJS buttons sample https://www.basicprimitives.com/reactusecases/buttons