Announcement

Collapse
No announcement yet.

Plot Multiple Values on Chart

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Plot Multiple Values on Chart

    Is it possible to plot multiple values on a scriptcase chart say with actual monthly sales and target sales value?

    Maybe the target sales could be plotted as a line chart and the actual sales could be plotted as a column chart?

  • #2
    I've been trying this too with not much luck. If it isn't possible it at least is a feature request. Bartho????
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Yes this is possible if you convert your column data into row data, then you can do comparison chart

      Comment


      • #4
        Hi,
        how can we convert our column data into row data ?? I can't find . Finally I wanna reach a chart like Bar HTML 5 Chart. I can do that like this way ,right?

        Comment


        • #5
          plus one for this, i am looking for this since long time now, please jkazondovi, if you can, highlight it for us.. thankfully

          Comment


          • #6
            Hi hakan, itsme3,

            This is how i converted column data to row data to enable me to do comparisons in a scriptcase chart.

            Suppose this is the existing data in a table (sales_performance)

            month montlhy_target monthly_sales
            jan 100 90
            feb 200 150
            mar 300 230
            apr 400 330
            etc.

            I would convert this as follows:

            select month, "monthly_target" as chart_field, monthly_target as chart_value from sales_performance
            union
            select month, "monthly_sales" as as chart_field, monthly_sales as chart_value from sales_performance

            The convert data (from columns to rows) to scriptcase will look like this:

            month chart_field chart_value
            jan monthly_target 100
            jan monthly_sales 90
            feb monthly_target 200
            feb monthly_sales 150
            mar monthly_target 300
            mar monthly_sales 230
            apr monthly_target 400
            apr monthly_sales 330

            With scriptcase then you will be able to compare chart_field

            Hope this helps.
            Regrads,
            Jephta

            Comment


            • #7
              Will try this and let you know, seems interesting

              Cheers

              Comment


              • #8
                Hi
                may I ask you to give an explanation and code example on this, I can't make it:
                Originally posted by jkazondovi View Post

                With scriptcase then you will be able to compare chart_field

                Jephta

                Comment


                • #9
                  couldn't make it work either

                  Comment


                  • #10
                    Are you guys struggling for multi series chart?

                    like the one below:
                    mscolumn.jpg
                    Regards,
                    Cavadinha

                    Development Team
                    Netmake - IT Solutions

                    Comment


                    • #11
                      Yes we are, Cavadinha, if you can arrange for tutorial or webnar or a video would be great.

                      Comment


                      • #12
                        The chart app is new so we will continue to improve it in the future releases.

                        So, you need to make a blank app and use all its power. I will post a static example, it should be enough.
                        Switch -> INSTALL_PATH to your folder.

                        For more custom charts read FusionCharts documentation.
                        We have the right to use their lib so enjoy this powerfull add of V8.

                        The expected result should be this:
                        static graph.jpg

                        Code below:
                        Code:
                        ?>
                        <script language="javascript" type="text/javascript" src="/INSTALL_PATH/prod/third/jquery/js/jquery.js"></script>
                        <script language="javascript" type="text/javascript" src="/INSTALL_PATH/prod/third/fusioncharts/FusionCharts/FusionCharts.js"></script>
                        
                        <div id="chart-container" style="margin-top:35px;">FusionCharts will render here</div>
                        <script>
                            var chartReport;
                            
                            $(function() {
                                    generateGraphAppDev();        
                            });
                            
                            function generateGraphAppDev()
                            {        
                                    chartReport = new FusionCharts({
                                        type: 'mscolumn3d',
                                        renderAt: 'chart-container',
                                        width: '1200',
                                        height: '600',
                                        dataFormat: 'json',
                                        dataSource: {
                                        "chart": {
                                        "caption": "Aplications X Devs",
                                        "xAxisName": "Type of application",
                                        "yAxisName": "Ammount",
                                        "theme": "fint"
                                    },
                                    "categories": 
                                        [
                        					{
                        						"category":   
                        							[
                        								{"label": "Blank"},{"label": "Graph"},{"label": "Container"},{"label": "Control"},
                        								{"label": "Grid"},{"label": "Form"},{"label": "Filter"},{"label": "Menu"},
                        								{"label": "Menu Tree"},{"label": "Tab"},{"label": "Procedure"}
                        							]
                        					}
                        				],
                                        "dataset":
                        					[
                        						{
                        							"seriesname":"Admin","data":
                        							[
                        								{"value": "2"},{"value": "2"},{"value": "7"},{"value": "22"},{"value": "42"},{"value": "50"},
                        								{"value": "4"},{"value": "11"},{"value": "5"},{"value": "3"},{"value": "0"}
                        							]
                        						},{
                        							"seriesname":"Cavadinha","data":
                        							[
                        								{"value": "5"},{"value": "15"},{"value": "10"},{"value": "1"},{"value": "31"},{"value": "20"},
                        								{"value": "33"},{"value": "1"},{"value": "12"},{"value": "3"},{"value": "9"}
                        							]
                        						},{
                        							"seriesname":"Smiley Face","data":
                        							[
                        								{"value": "10"},{"value": "1"},{"value": "3"},{"value": "0"},{"value": "22"},{"value": "27"},
                        								{"value": "5"},{"value": "2"},{"value": "7"},{"value": "9"},{"value": "0"}
                        							]
                        						}
                                    		]
                                		}
                            		});
                        
                                    chartReport.render();
                                    
                            }
                        </script>
                        
                        <?php
                        Regards,
                        Cavadinha

                        Development Team
                        Netmake - IT Solutions

                        Comment


                        • #13
                          Interesting to try, will give it a shot.

                          Thanks Cavadinha.

                          Comment


                          • #14
                            Yes we are. I would be helped much if I know how to put multiple series in charts. Not only this one, but also a line chart etc. Would be great if you have a step by step explanation. The javascript means that you have to generate a lot of echo's to get that done, as you can generate the charts from grids. So it would be great if we could generate multiple series from a series of grids? I would like to avoid javascript.
                            Albert Drent
                            aducom software netherlands
                            scriptcase partner, reseller, support and (turn-key) development
                            www.scriptcase.eu / www.scriptcase.nl

                            Comment


                            • #15
                              Originally posted by aducom View Post
                              Yes we are. I would be helped much if I know how to put multiple series in charts. Not only this one, but also a line chart etc. Would be great if you have a step by step explanation. The javascript means that you have to generate a lot of echo's to get that done, as you can generate the charts from grids. So it would be great if we could generate multiple series from a series of grids? I would like to avoid javascript.
                              We are javascript, you will be assimilated...resistance is futile .... javascript is the future*.....





                              * Future now, tomorrow we will see....
                              /Giuseppe

                              Professional Scriptcase Services
                              Some Customers opinions

                              Comment

                              Working...
                              X