Hi,

I`m currently trying to implement stock charts with your plugin.

I`ve got for example this data:
20141201|100
20141202|101
20141203|90
20141204|110
20141205|80
20141208|120

Because my data has missing points in between I need to specify the horizontal distance between 2 Points.
I think that the charting implementations could handle this for themself.
But I haven't yet figured out how to implement the xaxis.

Comments

Pierre.Vriens’s picture

What is "stock charts", a Drupal module or something else, any URL ?

Also, how about using 'data labels', as shown in the last example of the community documentation?

If that is not what you're looking for, maybe searching the issue queue for axis might help?

Sawascwoolf’s picture

Hi,

I'm developing my own module which will display stock-charts like for example:
https://wertpapiere.ing-diba.de/DE/Showpage.aspx?pageID=23&ISIN=US30303M...

The biggest problem is to get the horizontal space between each datapoint, as they are not equal. For example on Saturday or Sunday there will be no points. So I will have to set the data with explicit x (date value) -> y (price) relationship.

As result I would like to have something equal to the crawling stats from Google's Webmastertools.

pineiden’s picture

I have a similar issue, i have the date information but the chart module show me the index

Pierre.Vriens’s picture

Status: Active » Postponed (maintainer needs more info)

Interesting issue/question ... I am wondering if the patch in #2052429-12: Make multiple series charts easier to create through Views might somehow help to resolve this issue. Can you give that patch a try to see the result of it in your case (and let us know your feedback about it)?

balagan’s picture

I think the patch mentioned in #4 concerns only charts created via views, but it should be possible to create datetime values simply using the API. I was not able to figure out how. I have tried using datestamps and string representations of dates. The chart always uses columns of string type, but I thought that is not necessary a problem, and I might still be able to use a datetime formatter. There was a todo about it, and I have uncommented the corresponding line and was playing around a bit, but got no result. I also see no way how to set a column to type datetime via the chart wrapper.

tcowin’s picture

Not sure if this is relevant at this point, but in the current Recommended release 7.x-2.0-rc1, dated 3/18/2014, there's a critical line missing:

$axis['type'] = $chart[$key]['#axis_type'];

-- this line actually sets the axis type into Google Charts (line 108 of charts/modules/charts_google/charts_google.inc). It appears that this corrected in the Dev version.

This omission will cause difficulty in creating any charts using Google Charts via the Charts API with a significant number of dates/times... - or actually where you are relying on the chart to be a type other than string, I assume.

Hopefully the Recommended release gets updated soon...