This is a migrated thread and some comments may be shown as answers.

[Solved] MultiAxisChart

1 Answer 138 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Brahadesh
Top achievements
Rank 1
Brahadesh asked on 15 Oct 2014, 12:42 PM
I need to create a Multi-Axis chart ,

Double bar chart … Dual Axis 
1st bar  -> Sales   2nd bar -> Cost
Color coded by State 
Line -> Sales Margin
By Month as X-Axis

I am using json web service to bind data.

I am not able to figure out. Please need a help


$("#Chart").kendoChart({
                                                        dataSource: {
                                                            data: result
                                                        },
                                                        legend: {
                                                            visible: false
                                                        },
                                                        series: [{
                                                            type:"column",
                                                            field: "Sales",
                                                            name: "Sales",
                                                            color: "#3A5ECF",
                                                            categoryField: "MonthName",
                                                            tooltip: {
                                                                visible: true,
                                                                template: "#= kendo.toString(value, 'c') # ",
                                                            }
                                                        }, {
                                                            type:"column",
                                                            field: "Cost",
                                                            name: "Cost",
                                                            categoryField: "MonthName",
                                                            color: "#87F5F3",
                                                            tooltip: {
                                                                visible: true,
                                                                template: "#= kendo.toString(value, 'c') # ",
                                                            }
                                                        }
                                                        , {
                                                            type: "line",
                                                            field: "ContributionMargin",
                                                            name: "ContributionMargin",
                                                            color: "#CCCCCC",
                                                            axis: "ContributionMargin",
                                                            tooltip: {
                                                                visible: true,
                                                                format: "{0}%",
                                                            }
                                                        }],
                                                        valueAxes: [
                                                           {
                                                               title: { text: "Sales" },
                                                               labels: {
                                                                   format: "#= kendo.toString(value, 'c') # "
                                                               }
                                                           },
                                                        {
                                                            name: "ContributionMargin",
                                                            title: { text: "Contribution Margin" },
                                                            labels: {
                                                                format: "{0}%"
                                                            }
                                                        }],

                                                        categoryAxis: {
                                                            majorGridLines: {
                                                                visible: false
                                                            },
                                                            field: "State",
                                                            axisCrossingValues: [0, 200]
                                                        }

                                                    });

1 Answer, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 16 Oct 2014, 11:43 AM
Hi Brahadesh,

Could you please examine this online example and tell me if it works for you?

Regards,
Hristo Germanov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Brahadesh
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Share this question
or