How to create an add on chart to overlap 2 data series using the Charts module? - drupal

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.

Related

How to display the number of nodes or tags in Drupal?

I am new to Drupal. I am working on a site that requires me to display the number of nodes (content) in a group/tag. Similar to the way the number of modules and themes currently available for Drupal are shown on the homepage of Drupal.org.
Can anyone help me on this, or point me to the right module(s)?
I seem to understand that this question is a variation of what the purpose is of one of the Out-of-the-box examples that you get by simply installing (and enabling) the charts module, and without any additional configuration.
By doing so, and assuming you have the views module installed/enabled also, a new view is added to your site. Here are some more details about it, quoted from the linked page above (to which I added some formatting here):
You can see the charts created via this new view in your own site by
navigating to charts/examples or by using a menu link with a title
like Charts examples. After doing so, a page is shown with 2 sub-menu
tabs:
the first tab is titled Built-in examples (this example is used to
showcase Using the Charts API).
the second tab is titled Views
example, and is what is created from the new view created during the
installation of the charts module. As an alternative to using this
tab, just navigate to charts/examples/views in your site. You should
then see a column chart and a pie chart, which are followed by a
tabular display also. Both charts and the table display contain data
about the total number of nodes for each of the available content
types.
Since you're new to Drupal, this might be a good starting point to get you going with some of the basic stuff of the Views module. You can use these views to further tune/clone these samples to make them fit your exact needs.
Disclosure: I'm the maintainer of this module,
I hope this does not violate the site's policy on self-promotion.

Add progress chart on my web pages

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.

Can you customise a post on Facebook Timeline?

As far as I understand, an App can post into a User's Timeline.
My question is, how much can you customase/style this post?
I believe you can, at least, add a custom image and links. Can you also add HTML elements and CSS?
for example, nikeplus and RunKeeper seem to add some basic styling:
http://static.ak.fbcdn.net/rsrc.php/v1/yu/r/60YqMBkteVy.jpg
Short answer
No you can't.
Longer answer with more details
What you're looking for is called an Open Graph Action, it's not the usual Facebook status update. What you see in the screenshot linked by you, is an aggregation of all Open Graph Actions of a specific type.
You can not customize the layout of this aggregation. You can just select one of the 6 basic layouts and configure how the actions should be aggregated, sorted and/or filtered.
You can setup your own actions by going to the Facebook Developer Center, select one of your FB Apps, set a namespace in the basic settings (if not already done) and then got to "Open Graph". Once you've set up your own actions you can create your aggregations.
Here are a few links to get you started:
How-To: Defining an Aggregation
Open Graph Technical Guide
Open Graph Concepts

Google Vizualization Charts - Save to File

I am using Google Vizualization API to create an organization chart.
The API itself does not seem to have a feature to save charts to JPEG, PDF etc.
What options do I have to save the chart to file? [this file will be sent as an email attachment]
There's a great guide to saving gviz charts as images here and a corresponding github gist. It works with SVG charts from the gviz series (note, no Flash).
You can't save the org chart as an image or PDF.
Unlike some of the other Google charts, the code for this creates divs on the page.
If you're not looking for an automated process, you could just take a screenshot of the chart, save it as an image & email it as an attachment.
http://code.google.com/apis/chart/interactive/docs/gallery/orgchart.html
Since you want it automated, the only solution I can think of is a third party control..and you'll probably have to pay for it.
Not many companies make org chart controls..even the popular companies like Telerik & Dundas have not ventured into it yet.
NWoods has a diagram control:
http://www.nwoods.com/components/dotnet/godiagram-overview.htm
There's another at orgchartcomponent.com
http://www.orgchartcomponent.com/doc.aspx
You'll probably have to check the documentation on how the charts are rendered.
If they are images, you can save it as a file.

ASP.Net Charts LabelURL

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"

Resources