donatso / family-chart

family tree visualization built on top of d3
MIT License
179 stars 63 forks source link

Cannot find the list of all props of the constants store, view and Card respectively that can be changed #19

Open kumar-abhinit opened 1 year ago

kumar-abhinit commented 1 year ago

Please publish the list of all props of the constants store, view and Card respectively that can be changed. I have elaborated the issue below:

const store = f3.createStore({
    data: data(),
    node_separation: 300,
    level_separation: 170,
  }),
  view = f3.d3AnimationView({
    store,
    cont: document.querySelector("#FamilyChart"),
  }),
  Card = f3.elements.Card({
    store,
    svg: view.svg,
    card_dim: {
      w: 250,
      h: 70,
      text_x: 75,
      text_y: 15,
      img_w: 60,
      img_h: 60,
      img_x: 5,
      img_y: 5,
    },
    card_display: [
      (d) => `${d.data["first name"] || ""} ${d.data["middle name"].charAt(0)+"." || ""} ${d.data["last name"] || ""}`,
      (d) => `${d.data["birthday"] || ""}`,
    ],
    mini_tree: true,
    link_break: true,
  });

For example, in the above code we have passed the props to render customized data but in the same format as you have created in the package, in the same way.

If you can publish the list of all such properties and data types they accept, (props) which do not cause bugs on changing them. I hope you got my point. I think that this feature will add more flexibliity in building application using this package.

Thanks, kindly and hopefully waiting for a response back

donatso commented 1 year ago

That is all properties for now. One more property is custom_elements on card, but it only works on development branch for now: https://github.com/donatso/family-chart/blob/development/examples/custom-elements-and-actions/custom-elements-and-actions.js