Closed (fixed)
Project:
Charts
Version:
7.x-2.x-dev
Component:
Views integration
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Apr 2014 at 09:02 UTC
Updated:
18 Apr 2019 at 05:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
quicksketchCan you try setting up a chart that's not the master as the parent chart? Using the master chart will only work if you directly embed the master chart somewhere else, such as in a panel.
Comment #2
dalearyous commentedthis issue is also found here: https://drupal.org/node/2052429 (post #16, i am post #17 and glad i found this).
so the master cannot be the parent chart?
edit* i recreated the view with a master, a page with chart, and an add-on chart and i still have the same issue. what the hell?
Comment #3
Jovean commentedI have the same issue. In other words: an error is shown (exactly as OP mentioned) when I choose a display as the parent chart other then "Master".
The charts are also not combined in the parent display (which is a block display, in my case).
Comment #4
rudyard55 commentedHave you tried:
Comment #5
Jovean commentedExcept for creation of a page display - I needed to use a block display, so I could use the chart in panels - I followed exactly this procedure.
Comment #6
rudyard55 commentedJovean, On working further with the chart addons with additional datasets, I've also come to find odd behavior. I've had "extra" columns show up that don't resolve back to valid data pairs. A column will appear with a duplicated numeric value that doesn't resolve back to a labeling field. I suspect an error is occurring during aggregation. In my case, I only trust the module to display datasets with a single data column at this juncture. With one data column I can get consistent accurate results. At the point of using the "chart addon" to try to display additional values, the odd behaviors begin.
Comment #7
alibama commenteddefinitely buggy = the page views simply don't work with chart-add-ons... bummer... hopefully see some improvement here, otherwise the best charting module in drupal
Comment #8
Roensby commentedI think I know why this issue occurs.
My variant of this issue: The error message "This chart add-on must have a parent chart selected under the chart settings." is accompanied by two instances of this error message:
"Notice: Undefined index: style_plugin in charts_plugin_style_chart->get_parent_chart_display() (line 321 of .../sites/all/modules/charts/views/charts_plugin_style_chart.inc)."The function get_parent_chart_display assumes that $parent_display->display_options['style_plugin'] is set, which it will be if the parent chart view display is overridden.
However, if the view display relies on the master display, $parent_display->display_options['style_plugin'] is not set, since the parent view display just takes whatever display format the master display has.
I'm not sure if that is how Views operates, but my claim is supported by the fact that if I override the display format of my parent chart and set it to chart ( even though it already is set to chart by virtue of the master display ), the add-on chart works again.
I hope that makes sense :)
Comment #9
Roensby commentedWe simply change this line in charts_plugin_style_chart.inc:
to this
This covers both cases: When the parent chart has overriden the master display and when it hasn't.
Comment #10
alibama commented@CChow thanks man = I'll test this patch in just a bit, sounds promising
Comment #11
alibama commentedThis patch fixed everything for me... RTBC +1 & Thank you CChow
Comment #12
ethanhinson commented#9 fixed this problem for me too. Thanks!
Comment #13
codekarate commented#9 works for me too. RTBC +1
Comment #14
ryantollefson commented#9 fixed the major issue I was having. Thanks.
However, the add-on chart portion doesn't seem to respect filters that are on the parent chart. When I apply a filter to the parent, the add-on labels disappear (and are replaced with numbers), but the columns still appear.
Comment #15
hellogeli commentedI used relationship to grab a webform submission data from the user and display that in the add on chart. It is showing in the add on chart but not in the parent chart. What should I do, please?
Comment #16
Pierre.Vriens commentedComment #17
Pierre.Vriens commentedComment #18
Pierre.Vriens commentedSorry for the time to get this issue moving forward. I needed time to become familiar with the charts code, features and terminology (and I'm still learning, sorry ...). However now I feel more comfortable moving forward with this not-so-obvious issue, so I'm going to move ahead with the patch in #9 (thanks for it @CChow !). I'm also slightly adapting the title.
However, it appears to me that at least in #14 there might be some other "related" issue, which potentially will not be resolved by this patch (maybe also for #15?). If that's the case, please create a NEW issue where appropriate, splitting problems in different issues makes each of them more manageable, OK?
Comment #19
ryantollefson commentedThanks Pierre. I will try the latest version.
Comment #20
Pierre.Vriens commentedThank you Ryan, that's how we get things moving forward. Keep us informed about your results please: an extra comment in this issue (if it is resolved), or a new issue (with reference to #14 maybe if it is not), OK?
Comment #21
sajosh commentedI was getting both errors (original post and #8). Patch in #9 fixed errors. Two charts work now.
As for #14, I have a filter on the parent chart which is being respected. Perhaps my setup is different.
Thanks for making this module and the fix.
I'm on D7.36, Charts 7.x-2.0-rc1+5-dev, Views 7.x-3.11
Comment #22
dqdHas this patch been ever committed?
Error still persists in latest dev and makes using the Chart overlay add on view impossible, since the error keeps the view in the error status stage, not be able to be saved ever. Only disabling and removing the Add on view again makes it possible to save the whole views view. Since this is a denoted feature which makes this module outstanding from other modules in this category we should consider this bug as major to get fixed asap. (?)
The whole described functionality from http://cgit.drupalcode.org/charts/tree/README.txt line 91-117 is broken atm.
Issues in the comments #14 and #15 are not related and should be filed separately. Especially #14 could be a configuration error since the add on can not overlay on outranging scale. If the parent label range is exceeded from the overlay, the rest would be shown as default scale numbers. This works as designed. In this case it should be considered to flip the order from which is parent and which is overlay to prevent this behavior.
Comment #23
dqd#16 / #17 Please consider the patch for available versions from the project page (at least latest 7.x dev - the Drupal way) since this patch doesn't implement an API change and the bug breaks denoted functionality.
Comment #24
dqdTested with latest dev and applied without any conflicts. Bug disappears.
Comment #25
mwidner commentedI also tested patch in #9 against the latest dev code. Also confirming that the patch gets rid of this error when trying to combine with a parent chart.
Comment #26
jbabiak commentedPatch #9 worked great, Thanks!
Comment #27
drunken monkeyI think the current solution is a bit too complicated, we can just use
get_option()here – that's exactly what this method is there for.Also, the same was used to solve virtually the same problem in #2219973: Sub-charts cannot be attached to displays that inherit from defaults (don't know why it popped up again, don't know much about this module).
Patch attached, seems to work fine for me.
Comment #28
drunken monkeyMaking the issue title (hopefully) a bit clearer, though it's hard to express this issue concisely.
Comment #29
samuel.seide commentedPatch #9 worked for me. I used this patch to implement a "target line" using the column graph and then overlaid a line graph for the target line.
Comment #30
andileco commented@drunken-monkey's patch (#27) worked for me, although I had to go through all the displays and reset the display options, and it was looking like it wouldn't work for a few minutes.
Comment #32
andileco commented