Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_model_name = Unicode('PlotModel').tag(sync=True)
_view_module = Unicode('beakerx').tag(sync=True)
_model_module = Unicode('beakerx').tag(sync=True)
model = Dict().tag(sync=True)
def __init__(self, **kwargs):
super(TreeMap, self).__init__()
self.chart = TreeMapChart(**kwargs)
self.model = self.chart.transform()
def setColorProvider(self, provider):
self.chart.colorProvider = provider
self.model = self.chart.transform()
class TimePlot(Plot):
def __init__(self, **kwargs):
super(TimePlot, self).__init__(**kwargs)
self.chart.type = 'TimePlot'
def getChartColors(self, columnNames, colors):
chartColors = []
if colors is not None:
for i in range(len(columnNames)):
if i < len(colors):
chartColors.append(self.createChartColor(colors[i]))
return chartColors
def createChartColor(self, color):
if isinstance(color, list):
try:
return Color(color[0], color[1], color[2])
_model_name = Unicode('PlotModel').tag(sync=True)
_view_module = Unicode('beakerx').tag(sync=True)
_model_module = Unicode('beakerx').tag(sync=True)
model = Dict().tag(sync=True)
def __init__(self, **kwargs):
super(TreeMap, self).__init__()
self.chart = TreeMapChart(**kwargs)
self.model = self.chart.transform()
def setColorProvider(self, provider):
self.chart.colorProvider = provider
self.model = self.chart.transform()
class TimePlot(Plot):
def __init__(self, **kwargs):
super(TimePlot, self).__init__(**kwargs)
self.chart.type = 'TimePlot'
def getChartColors(self, columnNames, colors):
chartColors = []
if colors is not None:
for i in range(len(columnNames)):
if i < len(colors):
chartColors.append(self.createChartColor(colors[i]))
return chartColors
def createChartColor(self, color):
if isinstance(color, list):
try:
return Color(color[0], color[1], color[2])
def _ipython_display_(self, **kwargs):
self.model = self.chart.transform()
super(Plot, self)._ipython_display_(**kwargs)
def _ipython_display_(self, **kwargs):
self.model = self.chart.transform()
super(Plot, self)._ipython_display_(**kwargs)