-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Angular v17 project fails to render actual template property in the sample data #343
Comments
Hi Alkoch, can you fork and link an actual failed sample with the issue reproduced? When I tested the third link, it was working as expected. As for the Angular, yes it's using an v12 , it's just a guide how you can use it within angular |
Thanks for the prompt reply! As I've studied this further, I can better understand the source of my confusion:
Since there is a node in the chart for each data item in the JSON it seems that the above is fetching the data but I can't find any code in this sample that defines what the node should look like, hence the default "message" being used to "style" each node.
This is where things get "mysterious". Both samples use the following code, which, like the 1st sample above, doesn't include any apparent way to define the node style but for some reason these two do display styled nodes:
I have searched all of the code and can't locate anything that would appear to define the node style. How are these two samples displaying styled nodes and why isn't the 1st one since they all appear to use the same code to render?
My questions are: B) If the answer to #1 is yes, then how are the two samples above producing the styled nodes we see without the use of .nodeContent() (you say the 1st sample works as well!)? Thank you. Al |
Hi David, Can you please take a look at my prior questions? Thank you. Al |
Hi , I see where the confusion is You are supposed to define your node style in the This example has different styling because it uses v1 of the org-chart, while the latest is v3 Here is a forked version of not working for you, working for me sample with nodeContent defined, this one uses v2 version but I think it will also work with v3 |
Hi David,
Thank you for the help. Al |
Yes, it was using different default visual appearance
You have to use the flat format. One of the examples has a similar case and converts nested data to flat one
No, don't have the sample. In my case, I tend to just disable type-checking for files where d3 was involved |
Hi David, Thanks for the answers! Al |
Describe the bug
I am using Angular v17 and have been able to get a chart to display but it appears there may be a bug in the latest version of this (very nice/awesome) library:
<div>Hello World</div>
}) which shows "Hello Word" for each node but I can't get your actual sample data template to be displayed.To Reproduce
I found three Angular projects where two display the correct node template but the third fails in the same way my code is failing:
Works:
Fails:
Expected behavior
The correct node content as seen in the 1st two URLs above.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Is there a current document for use with "modern" Angular. The failed URL above is using v12?
Thank you for your help.
The text was updated successfully, but these errors were encountered: