Replies: 1 comment
-
I'm really not sure if it will work creating it dynamically. Maybe add a
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
All the examples in the doc use a "hard coded chart" but I wondered if it was possible to create them based on a collection. I'm also trying to get the charts going based on time on the X and a value on the Y
For example I have this razor:
It's a much stripped down verison of the actual page but it exhibits the same.. I have an array of arrays of chart data, and this page is supposed to draw a table of one column with two charts in. The two charts do appear on the page, but they are completely empty - the Y axis runs from -1 to +1 and the X is totally unlabeled
As the razor is looping and making charts it builds a dictionary mapping charts and data and I iterate this in the post render and trigger the drawing - I think this is essentially the same as what the charts in the documentation do - to have a mechanism in the @code that only draws once. (I do find that I get multiple renders happening but I'm not sure it's causing the empty charts problem).
I'm not sure if what I do in the html part of the page(where the chart is added to the markup, is actually sane) - but I can't find anything to compare it against that isn't e.g. ref="someHardCodedSingleField" and I don't know if these things are supposed to have unique refs, or unique ids etc
Beta Was this translation helpful? Give feedback.
All reactions