I'm going to set the bar colors either shades of the pie slice or draw put a border the color of the pie slice selected. I actually just got the shades working now. I have a feeling the border is going to be trickier.
On Tue, Apr 1, 2014 at 4:51 PM, asgallant <[email protected]> wrote: > What do you want to do with the color? > > The colors option sets the colors for the pie slices to use, where the > first slice uses the first color in the array, the second slice uses the > second color, etc. > > > On Tuesday, April 1, 2014 4:23:32 PM UTC-4, Doug Elder wrote: > >> Yes my rough code was as follows, but row didn't return what I thought. >> if (sel[0].row == 1) { >> chart5.setOption('colors', ["#0066FF", "#6495ED", "#87CEFA"]); >> }else if (sel[0].row == 2){ >> chart5.setOption('colors', ["#D52D12", "#B22222", "#FF6A6A" ]); >> }else if (sel[0].column == 3){ >> chart5.setOption('colors', ["#FF9700"]); >> }else if (sel[0].column == 4){ >> chart5.setOption('colors', ["#26931C"]); >> } else if (sel[0].column == 5){ >> chart5.setOption('colors', ["#6600CC"]); >> } >> >> >> On Tue, Apr 1, 2014 at 4:15 PM, asgallant <[email protected]> wrote: >> >>> You can get the name of the slice by referencing the appropriate column >>> in the DataTable (usually column 0). Getting the slice color is a bit more >>> difficult. Are you setting the colors or slices.<slice index>.coloroptions? >>> >>> >>> On Tuesday, April 1, 2014 4:05:18 PM UTC-4, Doug Elder wrote: >>> >>>> I can get the "name" of the pie slice from that yes, but since this is >>>> all dynamic I'm after the color or the slice. Slice one is blue, slice two >>>> is red... Can you pull that out of there somehow? >>>> >>>> >>>> On Tue, Apr 1, 2014 at 3:55 PM, asgallant <[email protected]>wrote: >>>> >>>>> The row returned by sel[0].row tells you which slice was clicked on. >>>>> >>>>> >>>>> On Tuesday, April 1, 2014 3:47:37 PM UTC-4, Doug Elder wrote: >>>>> >>>>>> Thanks once again. Is there any way to tell if you have clicked on >>>>>> the 1st, 2nd, 3rd etc slice? >>>>>> >>>>>> >>>>>> On Tue, Mar 25, 2014 at 5:23 PM, asgallant <[email protected]>wrote: >>>>>> >>>>>>> Your code is quite close to correct, there were just a few things >>>>>>> that needed fixing. Try this: http://jsfiddle.net/asga >>>>>>> llant/QXJ7Q/3/ >>>>>>> >>>>>>> On Tuesday, March 25, 2014 4:52:43 PM UTC-4, Doug Elder wrote: >>>>>>>> >>>>>>>> Please help, I'm trying to do the same thing from a pie chart to a >>>>>>>> bar graph and none of it transfers over between it. Here is my >>>>>>>> jsFiddle: >>>>>>>> http://jsfiddle.net/delder818/QXJ7Q/2/ >>>>>>>> I've tried changing it to various getData, getColumnId, >>>>>>>> GetColumnLabel. I can't seem to figure out the difference in the pie >>>>>>>> chart. >>>>>>>> >>>>>>>> On Wednesday, March 19, 2014 8:33:38 AM UTC-4, Doug Elder wrote: >>>>>>>>> >>>>>>>>> Perfection! This really gets my feet under me and the chart looks >>>>>>>>> great. It will add just what my customers are looking for. Thank you >>>>>>>>> again >>>>>>>>> for all the help. >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Mar 18, 2014 at 6:28 PM, asgallant <[email protected] >>>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Pull the data you want from the DataTable via the #getValue >>>>>>>>>> method. To get the store name in the first row of "data", it would >>>>>>>>>> be: >>>>>>>>>> >>>>>>>>>> data.getValue(0, 0); >>>>>>>>>> >>>>>>>>>> You can use this to set the chart title and to set the filter on >>>>>>>>>> the rows. I updated the example with this: >>>>>>>>>> http://jsfiddle.net/asgallant/N2WX2/8/ >>>>>>>>>> >>>>>>>>>> On Tuesday, March 18, 2014 4:05:36 PM UTC-4, Doug Elder wrote: >>>>>>>>>>> >>>>>>>>>>> Yes it should be the first store in the data table and the Title >>>>>>>>>>> should be Division Breakdown for 'store name here'. Thank you very >>>>>>>>>>> much for >>>>>>>>>>> your help. Your example has been extremely helpful. I actually found >>>>>>>>>>> another example of yours that showed me how to change the name on >>>>>>>>>>> the >>>>>>>>>>> change. I just can't seem to figure out how to set the default. >>>>>>>>>>> Thanks >>>>>>>>>>> again. >>>>>>>>>>> >>>>>>>>>>> On Tuesday, March 18, 2014 3:59:37 PM UTC-4, asgallant wrote: >>>>>>>>>>>> >>>>>>>>>>>> Your fiddle was missing the google loader's jsapi script link >>>>>>>>>>>> in the "Resources" panel. Fixed here: >>>>>>>>>>>> http://jsfiddle.net/asgallant/N2WX2/7/ >>>>>>>>>>>> >>>>>>>>>>>> As far as setting the default value, what criteria do you want >>>>>>>>>>>> to use to determine the default? Should it be the first store in >>>>>>>>>>>> the >>>>>>>>>>>> DataTable, or the store with the highest value in "Value 1", or >>>>>>>>>>>> something >>>>>>>>>>>> else? >>>>>>>>>>>> >>>>>>>>>>>> On Tuesday, March 18, 2014 3:12:36 PM UTC-4, Doug Elder wrote: >>>>>>>>>>>>> >>>>>>>>>>>>> I actually think I have it working with the exception of how >>>>>>>>>>>>> to set the default row to display and generate the title for >>>>>>>>>>>>> chart 2 based >>>>>>>>>>>>> on the store name. I can change the chart 2 name on the click of >>>>>>>>>>>>> the graph >>>>>>>>>>>>> but am having trouble setting it up coming in. If I new how to >>>>>>>>>>>>> set the >>>>>>>>>>>>> default row that would probably give me insight into that. >>>>>>>>>>>>> >>>>>>>>>>>>> On Tuesday, March 18, 2014 8:44:20 AM UTC-4, Doug Elder wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>> Here is the chart image. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Tue, Mar 18, 2014 at 8:43 AM, Doug Elder wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Must be worse at this than I though. I can't get it to work >>>>>>>>>>>>>>> in jsfiddle. Here it is : http://jsfiddle.net/delder818/ >>>>>>>>>>>>>>> N2WX2/6/ >>>>>>>>>>>>>>> I commented out my json stuff and made up data. What is >>>>>>>>>>>>>>> confusing to me is the view on data. I could have 5 sets of >>>>>>>>>>>>>>> data or 25 in >>>>>>>>>>>>>>> my chart. Here is what it looks like now (not based on the >>>>>>>>>>>>>>> jsfiddle code) >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Monday, March 17, 2014 5:35:27 PM UTC-4, asgallant wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Post your code (or even better, a jsfiddle example) that >>>>>>>>>>>>>>>> demonstrates the problem, and I'll take a look. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Monday, March 17, 2014 10:54:27 AM UTC-4, Doug Elder >>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Almost there. I have both tables showing. The second table >>>>>>>>>>>>>>>>> shows what I put in as the default row but when I click on a >>>>>>>>>>>>>>>>> bar it freezes >>>>>>>>>>>>>>>>> and the second table never updates. The code below is what >>>>>>>>>>>>>>>>> controls that >>>>>>>>>>>>>>>>> correct? Only difference I can really see is I have now views >>>>>>>>>>>>>>>>> set up on the >>>>>>>>>>>>>>>>> first chart. Since I'm new to this not even sure how to debug >>>>>>>>>>>>>>>>> this issue. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Friday, March 14, 2014 12:28:16 PM UTC-4, asgallant >>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> The important view for the drilldown is this one: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> google.visualization.events.addListener(chart, 'select', >>>>>>>>>>>>>>>>>> function () { >>>>>>>>>>>>>>>>>> var sel = chart.getChart().getSelection(); >>>>>>>>>>>>>>>>>> var country = data.getValue(sel[0].row, 0); >>>>>>>>>>>>>>>>>> var rows = data2.getFilteredRows([{column: 0, value: >>>>>>>>>>>>>>>>>> country}]); >>>>>>>>>>>>>>>>>> var view = chart2.getView(); >>>>>>>>>>>>>>>>>> view.rows = rows; >>>>>>>>>>>>>>>>>> chart2.setView(view); >>>>>>>>>>>>>>>>>> chart2.draw(); >>>>>>>>>>>>>>>>>> }); >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> and the only requirement here is that the drilldown and >>>>>>>>>>>>>>>>>> filtering happens on column 0 in both DataTables (and you >>>>>>>>>>>>>>>>>> can change that >>>>>>>>>>>>>>>>>> to be a different column, if necessary). Whether the data >>>>>>>>>>>>>>>>>> is dynamic or >>>>>>>>>>>>>>>>>> not is irrelevant. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Friday, March 14, 2014 10:55:01 AM UTC-4, Doug Elder >>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Do you have an example using dynamic json data? I'm new >>>>>>>>>>>>>>>>>>> to this and don't see how you'd dynamically set the view. >>>>>>>>>>>>>>>>>>> Any help would be >>>>>>>>>>>>>>>>>>> appreciated. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Monday, January 14, 2013 7:11:13 PM UTC-5, asgallant >>>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Here's an example: http://jsfiddle.net/asgallant/x5Eth/ >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Monday, January 14, 2013 5:53:39 PM UTC-5, Raji >>>>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Here is the format of my chart: http://jsfiddle.net/ >>>>>>>>>>>>>>>>>>>>> asgallant/zwPuU/ >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> I would like to add drill down functionality - >>>>>>>>>>>>>>>>>>>>> Clicking on USA should yield another chart with US states >>>>>>>>>>>>>>>>>>>>> etc. All the >>>>>>>>>>>>>>>>>>>>> charts would be clickable to a drill down version. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> I understand I have to use the selection event, could >>>>>>>>>>>>>>>>>>>>> you give me an example of that? >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Thanks in advance! >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> You received this message because you are subscribed to a >>>>>>>>>>>>>>> topic in the Google Groups "Google Visualization API" group. >>>>>>>>>>>>>>> To unsubscribe from this topic, visit >>>>>>>>>>>>>>> https://groups.google.com/d/topic/google-visualization-api/N >>>>>>>>>>>>>>> qSGcrqOjYc/unsubscribe. >>>>>>>>>>>>>>> To unsubscribe from this group and all its topics, send an >>>>>>>>>>>>>>> email to google-visualization-api+unsub >>>>>>>>>>>>>>> [email protected]. >>>>>>>>>>>>>>> To post to this group, send email to >>>>>>>>>>>>>>> [email protected]. >>>>>>>>>>>>>>> Visit this group at http://groups.google.com/group >>>>>>>>>>>>>>> /google-visualization-api. >>>>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>> You received this message because you are subscribed to a topic >>>>>>>>>> in the Google Groups "Google Visualization API" group. >>>>>>>>>> To unsubscribe from this topic, visit >>>>>>>>>> https://groups.google.com/d/topic/google-visualization-api/N >>>>>>>>>> qSGcrqOjYc/unsubscribe. >>>>>>>>>> To unsubscribe from this group and all its topics, send an email >>>>>>>>>> to [email protected]. >>>>>>>>>> To post to this group, send email to google-visua...@ >>>>>>>>>> googlegroups.com. >>>>>>>>>> Visit this group at http://groups.google.com/group >>>>>>>>>> /google-visualization-api. >>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>> You received this message because you are subscribed to a topic in >>>>>>> the Google Groups "Google Visualization API" group. >>>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>>>>> pic/google-visualization-api/NqSGcrqOjYc/unsubscribe. >>>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>>> [email protected]. >>>>>>> To post to this group, send email to [email protected] >>>>>>> om. >>>>>>> Visit this group at http://groups.google.com/group >>>>>>> /google-visualization-api. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "Google Visualization API" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>>>> pic/google-visualization-api/NqSGcrqOjYc/unsubscribe. >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> [email protected]. >>>>> To post to this group, send email to [email protected]. >>>>> Visit this group at http://groups.google.com/group >>>>> /google-visualization-api. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Google Visualization API" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>> topic/google-visualization-api/NqSGcrqOjYc/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/ >>> group/google-visualization-api. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "Google Visualization API" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-visualization-api/NqSGcrqOjYc/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/google-visualization-api. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
