Haytham
Haytham

Reputation: 854

Kendo UI Bar chart series name from remote data

Hi I am displaying a bar chart using ASP.NET MVC 4 and Kendo ui Jquery , The chart is displayed correctly and everything works fine but i want to get the name of the chart series that I've put inside the red circle in the screen shot from data from the server how can I do that currently I am using just tstaic strings inside the chart configuration.enter image description here

 seriesColors: ["#f0c300", "#484b42"],
        series: [{
            name: "Oddo Avenir Euro CI-EUR",
            field:"PerfSP",
            categoryField: "date",
            border: {
                width: 0
            }
        }, {
            name: "Indicateur de référence *",
            field:"PerfBench",
            categoryField: "date",
            border: {
                width: 0
            }
        }],

enter image description here

Upvotes: 0

Views: 1014

Answers (1)

Replik
Replik

Reputation: 54

This doc can help you https://demos.telerik.com/kendo-ui/bar-charts/grouped-data

Pay attention to the data in a response

[
   {
    "date": "12/30/2011",
    "close": 405,
    "volume": 6414369,
    "open": 403.51,
    "high": 406.28,
    "low": 403.49,
    "symbol": "2. AAPL"
   },
  ...
  {
    "date": "7/29/2011",
    "close": 222.52,
    "volume": 5166268,
    "open": 221.29,
    "high": 225.75,
    "low": 219.51,
    "symbol": "3. AMZN"
   }
  ...
]

And config value

group: {
      field: "symbol"
      }

Upvotes: 1

Related Questions