Search results

Multiple Panes

Chart area can be divided into multiple panes using Rows and Columns.

Rows

To split the chart area vertically into number of rows, use Rows property of the chart.

  • You can allocate space for each row by using the Height property. The value can be either in percentage or in pixel.
  • To associate a vertical axis to a particular row, specify its index to RowIndex property of the axis.
  • To customize each row’s bottom line, use Border property.
row.razor
@using Syncfusion.EJ2.Blazor.Charts

<EjsChart Width="60%" Title="Weather condition JPN vs DEU">
   <ChartPrimaryXAxis ValueType="Syncfusion.EJ2.Blazor.Charts.ValueType.Category">
   </ChartPrimaryXAxis>
  
   <ChartPrimaryYAxis Title="Temperature (Fahrenheit)" LabelFormat="{value}°F" Minimum="0" Maximum="90" Interval="20">
   </ChartPrimaryYAxis>
  
   <ChartRows>
      <ChartRow Height="50%"></ChartRow>
      <ChartRow Height="50%"></ChartRow>
   </ChartRows>
  
   <ChartAxes>
      <ChartAxis Minimum="24" Maximum="36" Interval="2" OpposedPosition="true" RowIndex="1" Name="YAxis" labelFormat="{value}°C">
      </ChartAxis>
  </ChartAxes>
  
   <ChartSeriesCollection>
      <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y"  Type="ChartSeriesType.Column">
      </ChartSeries>
      <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y1" YAxisName="YAxis"  Type="ChartSeriesType.Line">
      </ChartSeries>
   </ChartSeriesCollection>
</EjsChart>

@code{
public class ChartData
{
    public string X;
    public double Y;
    public double Y1;
}

public List<ChartData> WeatherReports =  new List<ChartData>
  {
      new ChartData{ X= "Jan", Y= 15, Y1= 33 },
      new ChartData{ X= "Feb", Y= 20, Y1= 31 },
      new ChartData{ X= "Mar", Y= 35, Y1= 30 },
      new ChartData{ X= "Apr", Y= 40, Y1= 28 },
      new ChartData{ X= "May", Y= 80, Y1= 29 },
      new ChartData{ X= "Jun", Y= 70, Y1= 30 },
      new ChartData{ X= "Jul", Y= 65, Y1= 33 }, 
      new ChartData{ X= "Aug", Y= 55, Y1= 32 },
      new ChartData{ X= "Sep", Y= 50, Y1= 34 },
      new ChartData{ X= "Oct", Y= 30, Y1= 32 },
      new ChartData{ X= "Nov", Y= 35, Y1= 32 },
      new ChartData{ X= "Dec", Y= 35, Y1= 31 }
   };
}

Rows

For spanning the vertical axis along multiple row, you can use Span property of an axis.

row-span.razor
@using Syncfusion.EJ2.Blazor.Charts

<EjsChart Title="Weather condition JPN vs DEU">
    <ChartPrimaryXAxis ValueType="Syncfusion.EJ2.Blazor.Charts.ValueType.Category">
    </ChartPrimaryXAxis>
  
    <ChartPrimaryYAxis Span="2" Title="Temperature (Fahrenheit)" LabelFormat="{value}°F" Minimum="0" Maximum="90" Interval="20">
    </ChartPrimaryYAxis>
  
    <ChartRows>
       <ChartRow height="50%">
       </ChartRow>
       <ChartRow height="50%">
       </ChartRow>
    </ChartRows>
  
    <ChartAxes>
       <ChartAxis Minimum="24" Maximum="36" Interval="2" OpposedPosition="true" RowIndex="1" Name="YAxis" labelFormat="{value}°C">
       </ChartAxis>
    </ChartAxes>
  
    <ChartSeriesCollection>
       <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y"  Type="ChartSeriesType.Column">
       </ChartSeries>
       <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y1" YAxisName="YAxis"  Type="ChartSeriesType.Line">
       </ChartSeries>
    </ChartSeriesCollection>
</EjsChart>

@code{
public class ChartData
{
    public string X;
    public double Y;
    public double Y1;
}

public List<ChartData> WeatherReports =  new List<ChartData>
  {
      new ChartData{ X= "Jan", Y= 15, Y1= 33 },
      new ChartData{ X= "Feb", Y= 20, Y1= 31 },
      new ChartData{ X= "Mar", Y= 35, Y1= 30 },
      new ChartData{ X= "Apr", Y= 40, Y1= 28 },
      new ChartData{ X= "May", Y= 80, Y1= 29 },
      new ChartData{ X= "Jun", Y= 70, Y1= 30 },
      new ChartData{ X= "Jul", Y= 65, Y1= 33 }, 
      new ChartData{ X= "Aug", Y= 55, Y1= 32 },
      new ChartData{ X= "Sep", Y= 50, Y1= 34 },
      new ChartData{ X= "Oct", Y= 30, Y1= 32 },
      new ChartData{ X= "Nov", Y= 35, Y1= 32 },
      new ChartData{ X= "Dec", Y= 35, Y1= 31 }
   };
}

Rows

Columns

To split the chart area horizontally into number of columns, use Columns property of the chart.

  • You can allocate space for each column by using the Width property. The given width can be either in percentage or in pixel.
  • To associate a horizontal axis to a particular column, specify its index to ColumnIndex property of the axis.
  • To customize each column’s bottom line, use Border property.
column.razor
@using Syncfusion.EJ2.Blazor.Charts

<EjsChart Title="Weather condition JPN vs DEU">
        <ChartPrimaryXAxis ValueType="Syncfusion.EJ2.Blazor.Charts.ValueType.Category">
        </ChartPrimaryXAxis>
  
        <ChartPrimaryYAxis Title="Temperature (Fahrenheit)"  LabelFormat="{value}°F" Minimum="0" Maximum="90" Interval="20">
        </ChartPrimaryYAxis>
  
        <ChartColumns>
            <ChartColumn Width="50%">
            </ChartColumn>
            <ChartColumn Width="50%">
            </ChartColumn>
        </ChartColumns>
  
        <ChartAxes>
            <ChartAxis Interval="2" OpposedPosition="true" ColumnIndex="1" Name="XAxis" ValueType="Syncfusion.EJ2.Blazor.Charts.ValueType.Category">
            </ChartAxis>
        </ChartAxes>
  
        <ChartSeriesCollection>
            <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y"  Type="ChartSeriesType.Column">
            </ChartSeries>
            <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y1" XAxisName="XAxis"  Type="ChartSeriesType.Line">
            </ChartSeries>                                                                      
        </ChartSeriesCollection>
</EjsChart>

@code{
public class ChartData
{
    public string X;
    public double Y;
    public double Y1;
}

public List<ChartData> WeatherReports =  new List<ChartData>
  {
      new ChartData{ X= "Jan", Y= 15, Y1= 33 },
      new ChartData{ X= "Feb", Y= 20, Y1= 31 },
      new ChartData{ X= "Mar", Y= 35, Y1= 30 },
      new ChartData{ X= "Apr", Y= 40, Y1= 28 },
      new ChartData{ X= "May", Y= 80, Y1= 29 },
      new ChartData{ X= "Jun", Y= 70, Y1= 30 },
      new ChartData{ X= "Jul", Y= 65, Y1= 33 }, 
      new ChartData{ X= "Aug", Y= 55, Y1= 32 },
      new ChartData{ X= "Sep", Y= 50, Y1= 34 },
      new ChartData{ X= "Oct", Y= 30, Y1= 32 },
      new ChartData{ X= "Nov", Y= 35, Y1= 32 },
      new ChartData{ X= "Dec", Y= 35, Y1= 31 }
   };
}

Columns

For spanning the horizontal axis along multiple column, you can use Span property of an axis.

column-span.razor
@using Syncfusion.EJ2.Blazor.Charts

<EjsChart Title="Weather condition JPN vs DEU">
  <ChartPrimaryXAxis Span="2" ValueType="Syncfusion.EJ2.Blazor.Charts.ValueType.Category">
  </ChartPrimaryXAxis>

  <ChartPrimaryYAxis Title="Temperature (Fahrenheit)" Minimum="0" Maximum="90" Interval="20">
  </ChartPrimaryYAxis>

  <ChartColumns>
     <ChartColumn Width="50%">
     </ChartColumn>
     <ChartColumn Width="50%">
     </ChartColumn>
  </ChartColumns>
  
  <ChartAxes>
     <ChartAxis Minimum="24" Maximum="36" Interval="2" OpposedPosition="true" RowIndex="1" Name="YAxis">
     </ChartAxis>
  </ChartAxes>
  
  <ChartSeriesCollection>
     <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y"  Type="ChartSeriesType.Column">
     </ChartSeries>
     <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y1" YAxisName="YAxis"  Type="ChartSeriesType.Line">
     </ChartSeries>
  </ChartSeriesCollection>
</EjsChart>

@code{
public class ChartData
{
    public string X;
    public double Y;
    public double Y1;
}

public List<ChartData> WeatherReports =  new List<ChartData>
  {
      new ChartData{ X= "Jan", Y= 15, Y1= 33 },
      new ChartData{ X= "Feb", Y= 20, Y1= 31 },
      new ChartData{ X= "Mar", Y= 35, Y1= 30 },
      new ChartData{ X= "Apr", Y= 40, Y1= 28 },
      new ChartData{ X= "May", Y= 80, Y1= 29 },
      new ChartData{ X= "Jun", Y= 70, Y1= 30 },
      new ChartData{ X= "Jul", Y= 65, Y1= 33 }, 
      new ChartData{ X= "Aug", Y= 55, Y1= 32 },
      new ChartData{ X= "Sep", Y= 50, Y1= 34 },
      new ChartData{ X= "Oct", Y= 30, Y1= 32 },
      new ChartData{ X= "Nov", Y= 35, Y1= 32 },
      new ChartData{ X= "Dec", Y= 35, Y1= 31 }
   };
}

Columns

See Also