I've got some graphics working with the MS Asp.Net Chart controls, I noticed the labels have a label URL property, If I put a URL in there then it makes that label a link.
My question is, is it possible to have the label URL be dynamic for each entry in the graph for example I have a graph plotting how many tasks are outstanding for each project. I want the URL to go to the home page for each project.
e.g Http://www.mywebsite.com/projects.aspx?projectId=*InsertProjectIdHere*
I'm sure this must be quite a common thing to do so i'm guessing it is possible.
Thanks
If your x series has the project id in it, you can do
labelUrl = "Http://www.mywebsite.com/projects.aspx?projectId=#VALX"
Related
i want to add this type of progress graph in my site pages.
can any one plz help me
img link is here
You can use a JavaScript charting library to create a live, interactive version of the chart for your site. That way, you can update your progress instead of coding a new static chart each time you want to update it.
Here is an example of a time series line chart made using ZingChart's library. It is a bit different than the image you shared, because it has a Y axis. I'd recommend using one so your users know what is being measured across time.
I'm on the ZingChart team so please feel free to reach out if you have any questions.
The charts module (for drupal 7) facilitates using the Google Charts API. It is great at taking simple data in a view and displaying a nice chart. I have a problem when trying to display more than one series of data. In my case, I would like to plot two lines on the same graph.
This charts module allows for an add on chart that selects a parent chart and then overlaps the data. Sounds perfect, but it's not (at least not yet for me). Here are the steps I completed:
I created my view and setup the tabular display of data with fields and filters I need (as recommended in this Bonus Tip).
I then added a chart page, and set a filter to one item that creates the first line graph.
I then added an add-on chart and change the filter to show the second line graph.
The problem I encountered is when I select the parent display. I receive an error like "This chart add-on must have a parent chart selected under the chart settings." This is what I have done. The only way to get rid of the error is to choose the master as the parent display, which I do not think is right. I have posted on drupal forums and IRC chat with no luck.
My question: has anyone gotten the charts module to work with more than one data series? If so: how?
I had similar issues with pie and column charts with this module. I had little luck with the GUI. However if you look at the charts.api.php Charts supplies several hooks to edit the charts. For instance in my case I copied the Column chart $chart_type in hook_charts_type_info(), to help with GUI development. I also modified the xaxis, fields and labels for $chart via hook_chart_alter(). Looking at the structure and data in the $chart helped me to see what I needed to do through code. As I do not know your exact needs I will not venture further, hope it helps.
I'm a new maintainer of the charts module, and just discovered this question. Thought I'd try to get you going a bit ... Please refer to the Steps to create charts using the views UI, which is part of the (new) community documentation I created recently for the charts module (work in progress, contributions are appreciated ...). I'd be interested in knowing if it helps to get this "issue" solved.
Here are some other (related) documentation pages for the charts module, which may help to get you going with the charts module:
Getting Started.
Create Charts using views.
Charts Howtos.
If you like the content of these (new) documentation pages, please help spreading the word about them. If you don't like them, please let us know (i.e. 'me' ...).
PS about the "... i have posted on drupal forums ... with no luck": please add a link to those posts, so that I can go check them out also.
This is the issue in module. To fix this problem I found a patch here at official drupal.org https://www.drupal.org/node/2233089#comment-9004547 . I have used this patch and fix the issue.
To create dynamic charts and graphs in ASP.Net, I have placed the (GDI+) code for each chart in separate page files – so the output from running a chart page by itself if to just display the chart onscreen.
The chart page contains the code to get the relevant data from SQL Server, as well as the chart generation code. The generated chart object is then saved to Response.OutputStream.
A content page where I want to display the chart provides various parameters to determine what data will be used to generate the chart (such as userID, project ID, selection from dropdown lists etc.).
To display the chart as part of a content page, I then place an image object in the page, collect the various chart parameters, and in code behind set the URL of the image object to be the chart page, plus all the chart parameters added to the query string.
This works fine, except for one thing: when I right click on the chart image as it appears in the content page in the browser, I get an option to “open image”, which displays a page with the chart all by itself (perhaps not surprising as it is generated with a chart page). However, the problem is that in this chart page, the full URL with the querystring is visible, which means that a user could change the values in the query string, and thereby generate a new chart. This is a big problem, as it might enable a user to generate a chart for data they should not have access to.
Is there a way to avoid this problem whilst still using this “chart page” approach to generating and displaying dynamic charts? Alternatively, should I rather save the dynamically generated images as files, either on disk or as SQL Server Filestream objects for example, and then reference these in the page?
By the way, I am aware of the various ASP.Net chart controls that are available. However, the charts I need to generate are highly customised to a very specialised application, so those controls will unfortunately not work in this instance.
I have the same concern for one of my previous projects. One cheap but not 100% fool-proof solution is to insert a http-referer check before you process the image. Images loaded from within you page will have the referrer URL of your domain, those entered directly via the browser won't have.
Of course it's very easy to hack by faking referrer url, still it is some form of deterrent. Will be glad if others can offer their solutions.
Another way is to add some sort of checksum params into your querystring. Only you know how to 'decrypt' and only generate image when the checksum is 'correct'.
First of all, I assume that your users are authenticated (logged in) to your website, so you know who they are and what data/charts they are supposed to have access to?
You need to check the incoming parameters in your image-generating code to see if the current user has access to the data he asks for. Typically you would query your user/privilege tables for this (or call the Membership API or whatever).
Trying to hide the URL (for example by doing a POST instead of a GET to the image-generating page) is just "security by obscurity", which is not a good idea.
By the way, your problem is called "URL tampering", a Google search for this should get you in the right direction.
I need to show a Line Chart on an ASP.NET page where each data point has a tooltip that shows its exact X and Y values. A chart for a particular dataset will probably only ever be requested once, so caching is disabled and the chart will be regenerated if it ever needs to be shown again.
Restrictions:
Needs to work in a web garden environment
Cannot use Session
Cannot use rich media, such as Flash or Silverlight.
The approaches I've seen used an image map for a generated chart image. Due to the restrictions, all of my charts so far have been generated in a handler in memory, streamed directly back to the user, and then disposed of. Now I need to add tool tips, which would requires both HTML and an image.
My current plan is to generate the chart once on the page to get the HTML, ignore the generated image, and rewrite the "src" of the image tag to point to a second page. The second page generates the same exact chart as the first, ignores the HTML markup, and streams the image back to the client. This all seems very kludgy.
Is there an better way to do this that doesn't involve generating the chart twice?
Available chart controls:
Dev Express 8.2
Syncfusion 6.2
?? - Recommend something
What about using the Google Chart API, and a .Net wrapper? See this SO discussion for more information.
I solved this by using the MS Chart Control. The disk handler can share images across servers in the web garden and automatically cleans up after itself.
We are trying to develop an application to view and annotate PDF files in ASP.net.
The function involves capturing x,y coordinates from a click and placing the annotation on that specific location.
Are there available components to do this?
Thanks in advance.
I am not sure I have enough information to provide a specific answer to your question, but perhaps this info can get you started...
If I understand correctly, you are going to provide some UI that will enable the user to point to the location of the annotation when viewing the document, then you will modify the PDF on the server, and render it with the annotation at the point selected by the user.
Perhaps one way you can capture mouse input to enable the user to select the location of the annotation is to render an image of the PDF document page and show it on the page, and then capture the mouse location on a click event.
Then, if you have the annotation and the desired location, you could use a PDF library to update the PDF and draw your annotation into the document on the specified page at the specified X,Y coordinates.
We are using a PDF generation library that we are very happy with to render PDF documents on the web server, which we deliver to the browser via our ASP.NET application.
You might want to take a look at this product and see if it can meet your needs:
DynamicPDF from ceTe software: http://dynamicpdf.com/
Hope this helps.
We are also looking at this and found this Java applet which does the job very well.
I've used iTextSharp in the past, to annotate PDFs of Piping & Instrumentation diagrams - worked rather well.
We have also looked at jPDFNotes at qoppa, and had good results with it.