You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/08/11 06:37:49 UTC

[GitHub] [superset] villebro commented on a diff in pull request #21032: fix(plugin-chart-echarts): invalid total label location for negative values in stacked bar chart

villebro commented on code in PR #21032:
URL: https://github.com/apache/superset/pull/21032#discussion_r943139975


##########
superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/plugin-chart-echarts/Timeseries/Stories.tsx:
##########
@@ -87,3 +88,31 @@ export const Timeseries = ({ width, height }) => {
     />
   );
 };
+
+export const WithNegativeNumbers = ({ width, height }) => (
+  <SuperChart
+    chartType="echarts-timeseries"
+    width={width}
+    height={height}
+    queriesData={[{ data: negativeNumData }]}

Review Comment:
   I noticed that the storybook isn't formatting the temporal x-axis correctly:
   ![image](https://user-images.githubusercontent.com/33317356/184075959-280fd0ad-58bf-4797-baba-f27ded1e5817.png)
   Could we add an entry for `__timestamp` to `colnames` and `coltypes` which would normally be returned in the chart data payload so the formatting looks correct (2 comes from `GenericDataType.TEMPORAL`)? I believe this should fix it:
   
   ```suggestion
       queriesData={[{ data: negativeNumData, colnames: ['__timestamp'], coltypes: [2] }]}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org