Question

Is there a possibility to add notes on the categoryAxis in a Kendo Chart. As seen in the documentation it should be possible, but even after setting every single option i dont see any notes. I couldn't find any example of somebody doing that. Has anybody managed or used this feature?

my try on jsFiddle

        categoryAxis: {
            field: "age",
            justified: true,
            majorGridLines: {
                visible: false
            },
            minorGridLines: {
                visible: false
            },
            min: 10,
            max: 30,
            labels: {
                step: 5
            },
            notes: {
                data: [{
                    value: { age: 15 },
                    position: "top",
                    icon: {
                        visible: true,
                        size: 16,
                        type: "circle",
                        background: "#585858",
                        border: {
                            color: "#FFFFFF"
                        }
                    },
                    line: {
                        length: 16
                    },
                    label: {
                        visible: false,
                        text: " "
                    }
                }]
            }
        }

Thank you

Was it helpful?

Solution

The value property for notes on the categoryAxis appears to represent each category value.

Here's an example notes configuration:

notes: {
    label: {
         template: "Value: #: value #"
    },
    icon: {
        visible: true,
        size: 16,
        type: "circle",
        background: "#585858",
        border: {
            color: "#FFFFFF"
        }
    },
    line: {
        length: 16
    },
    data: [{ value: 1}, { value: 5 },{ value: 10 }, { value: 15 }, { value: 20 }]
}

Check out this updated fiddle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top