CenturyLinkCloud / Cyclops

The UX/UI Pattern Guide for the CenturyLink Platform
http://assets.ctl.io/cyclops
MIT License
20 stars 16 forks source link

Newbie: How are Charlist.JS options set ? #145

Closed ghost closed 6 years ago

ghost commented 7 years ago

For example, how would we set something like showLine: false?

var options = { showLine: false, axisX: { labelInterpolationFnc: function(value, index) { return index % 13 === 0 ? 'W' + value : null; } } };

An example of what I'm trying to implement is here: Scatter Chart Example

Thanks, Tom

guyaparker commented 7 years ago

@lundstrt, if I read you right then I think you would insert the chartist options you want into the chartOptions object that cyclops provides. See http://assets.ctl.io/cyclops/1.8.4/charts.html.

JS: $('.myChart').chart({type: 'Line', data: data, chartOptions: { showLine: false, axisX: { labelInterpolationFnc: function(value, index) { return index % 13 === 0 ? 'W' + value : null; } } })

Knockout: <div class="myChart" data-bind="chart:{ type: 'Line', data: data, chartOptions: { showLine: false, axisX: { labelInterpolationFnc: function(value, index) { return index % 13 === 0 ? 'W' + value : null; } } } }"></div>

jsmecham commented 6 years ago

What @guyaparker said. Closing.