question

BloomingDeveloper-9086 avatar image
0 Votes"
BloomingDeveloper-9086 asked yogyogi commented

How to Plot Graph in Asp.net Razor pages

Hi,

Is it possible to plot graph in Asp.net Razor pages with data from database, Any help would be appreciated.

Thanks,
Teena John

dotnet-aspnet-core-razor
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I recommend doing a little research to find a graph API that suits your needs. Then read the graph API to learn how the API works. Chart.js is a common client side API.


0 Votes 0 ·

There is an answer regarding using Chart.js file to create chart.


0 Votes 0 ·

1 Answer

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

there are two common ways to display a graph on a html page.

the first is the graph is an image created on the server. on a razor page this would be an <img> the with the url being an action that returns a file that is an image (typically jpeg). you can pass parameters on the url. The server would use the graphing library of its choice to create the image

the second (especially if interactive) is a client side grading solution as suggested in the prevues post.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.