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

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

Open
kumar-abhinit opened this issue Dec 12, 2022 · 1 comment

Comments

@kumar-abhinit
Copy link

kumar-abhinit commented Dec 12, 2022

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
Copy link
Owner

donatso commented Dec 12, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants