Apr 02, 2015, 12:59 PM
[CLOSED] Column Series Grouping - Help
Dear Team
I want to generate a chart like shown below by using ext.net charts, please see the image below FYI
I am not getting any idea how to use Numeric Axis, Category Axis and Bar/Column Series for the below data structure. Please advise any possible solution.
Mohan
I want to generate a chart like shown below by using ext.net charts, please see the image below FYI
I am not getting any idea how to use Numeric Axis, Category Axis and Bar/Column Series for the below data structure. Please advise any possible solution.
public class CompetencyCount
{
public string Competency { get; set; }
public double Count { get; set; }
}
public class EmployeeCompetencyData
{
public string JobTitle { get; set; }
public List<CompetencyCount> CompetencyCount { get; set; }
}
public partial class columnSeries : System.Web.UI.Page
{
string[] jobTitles = { "Developer", "Team Lead", "Project Manager", "Quality Control", "Business Analyst", "Region Head" };
string[] competency = { "Surveying", "Scientific Method", "Engagement", "Public Awareness", "Ethics", "Business Management", "Information Management", "Poeple Management", "Self Management", "Health and Safety" };
public List<EmployeeCompetencyData> GetEmpCompetencyLevels()
{
List<EmployeeCompetencyData> data = new List<EmployeeCompetencyData>();
Random random = new Random();
for (int i = 0; i < jobTitles.Length; i++)
{
EmployeeCompetencyData objData = new EmployeeCompetencyData();
List<CompetencyCount> lstComptencyCount = new List<CompetencyCount>();
for (int j = 0; j < competency.Length; j++)
{
CompetencyCount objCount = new CompetencyCount { Competency = competency[j], Count = random.Next(1, 10) };
lstComptencyCount.Add(objCount);
}
objData.CompetencyCount = lstComptencyCount;
data.Add(objData);
}
return data;
}
protected void Page_Load(object sender, EventArgs e)
{
Store3.Data = this.GetEmpCompetencyLevels();
Store3.DataBind();
}
}
<ext:ResourceManager ID="rm" runat="server" Theme="Neptune" />
<ext:CartesianChart ID="Chart1" runat="server" Height="400" Width="400">
<Store>
<ext:Store ID="Store3" runat="server">
<Model>
<ext:Model ID="Model9" runat="server">
<Fields>
<ext:ModelField Name="JobTitle" />
<ext:ModelField Name="CompetencyCount">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="Competency" />
<ext:ModelField Name="Count" />
</Fields>
</ext:Model>
</Model>
</ext:ModelField>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Axes>
<ext:NumericAxis Grid="true">
</ext:NumericAxis>
<ext:CategoryAxis />
</Axes>
<Series>
<ext:BarSeries >
</ext:BarSeries>
</Series>
</ext:CartesianChart>
RegardsMohan
Last edited by Daniil; Apr 10, 2015 at 2:03 PM.
Reason: [CLOSED]