ZingChart: Does ZingChart support spark lines?

Spark Theme

We do have a theme option of theme:spark which when placed in the top level of chart config object will essentially just hide the scales and add some other object properties like crosshairs to create a spark line format.

Example: https://demos.zingchart.com/view/0RL2J10K

All Chart Types

All chart types with spark theme

Example: https://demos.zingchart.com/view/163IFQ16

Hide Scales

Besides using the theme you could also hide the scales yourself for the same exact effect. In the following demo I just hide the scales. You can see the difference between non spark theme here. The plotarea margins are better in the sparkline theme, crosshairs hide the line and scaleLabel

"scale-y": {
  visible:false
},
"scale-x": {
  visible:false
},

Example: https://demos.zingchart.com/view/embed/6BRX5QJT

Making the Chart Identical to Spark Theme

To make the chart identical to spark theme you have to adjust a lot more properties. It's up to you which method you choose. This approach takes the most work and most knowledge of ZingChart to implement.

crosshairX:{
  lineWidth:0,
  plotLabel: {
    placement: 'node-top',
    callout:true,
    calloutPosition:'left',
    multiple:true
  },
  scaleLabel: {
    visible:false
  }
},
"scale-y": {
  visible:false
},
"scale-x": {
  visible:false
},
plotarea: {
  margin: 'dynamic'
},tooltip: { visible: false},

Example: https://demos.zingchart.com/view/embed/TUWLZTX1

Documentation

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us