Search Posts

Author: Fearhunter

Dynamic add charts based on a factory pattern

I want to add dynamically charts to a widget from a combobox. I have used the factory pattern to achieve this. This is the code for the backend: public interface ICharts { string chartType (); } public class ChartsFactory { public ICharts GraphType(ChartsType chartype) { switch (chartype) { case ChartsType.AREA: return new Area(); case ChartsType.BAR: return new Bar(); case ChartsType.HORIZONBAR: return new HorizonBar(); case ChartsType.HEATMAP: return new Heatmap(); case ChartsType.PIE: return new Pie(); default: throw […]

Highcharts components unresponsive with angular gridstack

I am using highcharts in combination with angular gridstack for making widgets and graphs. This is the situation now As you can see I am using a stacked bar component and area component both copied from the highcharts documentation. The problem is it is not responsive. This is my code of index.html <div class=”row”> <div class=”col-md-12″> <div gridstack class=”grid-stack grid1″ options=”options” > <div gridstack-item ng-repeat=”w in dashboard.Widgets track by $index” class=”grid-stack-item” gs-item-x=”w.x” gs-item-y=”w.y” gs-item-width=”w.width” gs-item-height=”w.height” […]