-
Notifications
You must be signed in to change notification settings - Fork 525
-
Notifications
You must be signed in to change notification settings - Fork 525
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
ASP.NET + SandDance: examples? #121
Comments
Hi @win32nipuh , you can take a look at the export to html feature, and use the html as a template. In the SandDance App, click the DataBrowser tab on the left. The export button is at the bottom. <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SandDance - Titanic%20%2844%29</title>
<link rel="stylesheet" type="text/css"
href="https://unpkg.com/@msrvida/sanddance-embed@1/dist/css/sanddance-embed.css" />
<link rel="stylesheet" type="text/css"
href="https://unpkg.com/@msrvida/sanddance-explorer@1/dist/css/sanddance-explorer.css" />
</head>
<body>
<script src="https://unpkg.com/react@16/umd/react.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js" crossorigin></script>
<script src="https://unpkg.com/deck.gl@6/deckgl.min.js"></script>
<script src="https://unpkg.com/vega@4/build/vega.min.js"></script>
<script src="https://unpkg.com/office-ui-fabric-react@6.204.4/dist/office-ui-fabric-react.js"></script>
<script src="https://unpkg.com/@msrvida/sanddance-explorer@1/dist/umd/sanddance-explorer.js"></script>
<script src="https://unpkg.com/@msrvida/sanddance-embed@1/dist/umd/sanddance-embed.js"></script>
<div id="app"></div>
<pre id='csv-data' style='display:none'>Name,Class,Joined,Job,TicketCost,Age,Gender,Survived,Department
"MINAHAN, Mrs Lillian E.",1st Class Passenger,Queenstown,,90,37,Female,True,
"MINAHAN, Miss Daisy E.",1st Class Passenger,Queenstown,,90,33,Female,True,
"KEANE, Miss Nora Agnes",2nd Class Passenger,Queenstown,,12.35,46,Female,True,
"SLAYTER, Miss Hilda Mary",2nd Class Passenger,Queenstown,,12.35,30,Female,True,
"BRADLEY, Miss Bridget Delia",3rd Class Passenger,Queenstown,,7.725,22,Female,True,
"BUCKLEY, Mr Daniel",3rd Class Passenger,Queenstown,Farm Labourer,7.820833333,21,Male,True,
"SHINE, Miss Ellen",3rd Class Passenger,Queenstown,,7.829166667,20,Female,True,
"SMYTH, Miss Julia",3rd Class Passenger,Queenstown,,7.733333333,17,Female,True,</pre>
<script>SandDanceEmbed.load(Object.assign({rawText: document.getElementById('csv-data').innerText}, {"type":"csv","displayName":"Titanic (44)"}))</script>
</body>
</html> |
Ok, thank you, will try. |
Thanks, I see, it works. |
The SandDanceEmbed.load function will take an array of objects, or a DataFile structure. The DataFile structure can optionally take a So if you need to make your own ajax request, once you have your response, you can either pass the text or an array that has been parsed. |
Thanx, I need to execute ajax request->ASP.NET controller->database. I.e. finally to display the chart based on database query. |
This works amazingly well. Thank you so much. You could check it out: |
I did not found the examples to see how to use SandDance in ASP.NET, ASP.NET Core applications.
I am sure it will be useful.
The text was updated successfully, but these errors were encountered: