Custom CSS
Custom CSS in Vitara Charts
If you use custom CSS styles in Vitara Charts, no presentational characteristics (such as fill, stroke, font styles, and so on) are applied to the chart SVG. Instead, CSS is used to apply the design.
To customize your styles, edit the customStyles.css file and add your own CSS rules.
The customStyles.css file is located at,
The following is an overview of the CSS rules which are internally set on the VitaraCharts.
CSS Rules
The chart area background. Use this to set the chart area background fills.
The plot area background. Use this to set the plot area background fills.
Class for the category axis. Use this to set the category axis labels text style.
Class for the value axis. Use this to set the value axis labels' text style.
The title of the axis. Set the axis title text style with this. To set the title of a given axis, use this class in conjunction with the category or value axis. Text characteristics such as font-family, font-style, color, text-decoration, text-transform, and letter-spacing can be changed.
The axis line is a straight line. Set the width and color of the axis line with this. To set the axis line attributes of a certain axis, use this class in conjunction with the category or value axis.
The line series. Use this to set the default line style in any line series. Use this class in conjunction with the chart's class name to specifically set the line properties of that particular chart. Line properties like stroke-dasharray, stroke and stroke-width can be set.
The grid line. Use this to set the grid line properties. Line properties like stroke-dasharray, stroke and stroke-width can be set.
The legend item text. Use this to set the legend item text style. Can change text properties like font-family, font-style, color, text-decoration, text-transform, letter-spacing.
Can change the fills and strokes and sizes of markers on VitaraCharts selected from the Marker tab in the property editor.
The datalabel. Use this to change the text style of datalabels. Can change text properties like font-family, font-style, color, text-decoration, text-transform, letter-spacing.
The default class for any data element on the chart.
For example, in bar chart a bar is a data element and in a bubble chart a bubble is a data element.
Use this to change the text style of datalabels. Can change text properties like font-family, font-style, color, text-decoration, text-transform, letter-spacing.
### CSS Class Names of charts | Chart Name | Class Name | | :--------------------------- | :-------------------------- | | Vitara Bar Chart | .VitaraHCBarChart | | Vitara Stacked Bar Chart | .VitaraHCStackedBarChart | | Vitara Column Chart | .VitaraHCColumnChart | | Vitara Stacked Column Chart | .VitaraHCStackedColumnChart | | Vitara Pie Chart | .VitaraHCPieChart | | Vitara Line Chart | .VitaraHCLineChart | | Vitara Area Chart | .VitaraHCAreaChart | | Vitara Tornado Chart | .VitaraHCTornadoChart | | Vitara Sparkline Chart | .VitaraHCSparklineChart | | Vitara Funnel Chart | .VitaraHCFunnelChart | | Vitara KPI Animation Chart | .VitaraKPIAnimationChart | | Vitara Simple KPI Chart | .VitaraSimpleKPIChart | | Vitara Dumbbell Chart | .VitaraHCDumbbellChart | | Vitara Slope Chart | .VitaraHCSlopeChart | | Vitara Circle Packing Chart | .VitaraD3CirclePackingChart | | Vitara Angular Gauge Chart | .VitaraHCAngularGaugeChart | View sample implementations
Last updated