Search code examples
javascriptdata-visualizationshieldui

Adjusting the appearance of a javascript- Shield UI Chart


I have a problem with Shield UI Chart. I need to hide all text on my X axis, that is dateTime. But i can't visualize the chart when I add the code that hides the axis. Below is the code that I am using. Will appreciate any assistance fixing it.

<script type="text/javascript"> $(function () { $("#chart").shieldChart({
            axisX: {

                axisTickText: {
                    enabled: false
                }
                axisType: 'datetime'
            },

                axisY: {
                    title: {
                        text: "Total Sales statistics"
                    }
                },
                primaryHeader: {
                    text: "Aaron's cars sales"
}, dataSeries: [{ seriesType: 'bar',

                    collectionAlias: 'New Cars Sales Volumes',
                    data: [325000, 425000, 316000, 378000, 390000]
                }, {
                    seriesType: 'bar',
                    collectionAlias: 'Used Cars Sales Volumes',
                    data: [125000, 175000, 158000, 130000,101000,98000]
                }]
            });
        });
    </script>

Solution

  • You have forgotton to put a comma between the different properties. You have axisTickText:{} and there must be a comma, because there is one more property following- axisType.

                   axisX: {
                        axisTickText: {
                            enabled: false
                        },
                        axisType: 'datetime'
                    },